ashe0042 commited on
Commit
9377c4e
·
1 Parent(s): 7711b0f

Download APRA prudential standards CPS 220/230/234 as PDFs

Browse files
Files changed (3) hide show
  1. .gitignore +2 -1
  2. data/provenance.md +18 -0
  3. scripts/pull_apra.py +64 -0
.gitignore CHANGED
@@ -1,4 +1,5 @@
1
  .env
2
  __pycache__/
3
  .venv/
4
- data/*.json
 
 
1
  .env
2
  __pycache__/
3
  .venv/
4
+ data/*.json
5
+ data/*.pdf
data/provenance.md CHANGED
@@ -14,3 +14,21 @@ Source: [isaacus/open-australian-legal-corpus](https://huggingface.co/datasets/i
14
  - date: 2025-02-21 00:00:00
15
  - url: https://www.legislation.gov.au/C1959A00006/2025-02-21/2025-02-21/text/original/epub/OEBPS/document_1/document_1.html
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  - date: 2025-02-21 00:00:00
15
  - url: https://www.legislation.gov.au/C1959A00006/2025-02-21/2025-02-21/text/original/epub/OEBPS/document_1/document_1.html
16
 
17
+ ## CPS 220 Risk Management
18
+
19
+ - url: https://www.apra.gov.au/sites/default/files/Prudential-Standard-CPS-220-Risk-Management-(July-2017).pdf
20
+ - download date: 2026-06-17
21
+ - attribution: Crown copyright, Commonwealth of Australia (APRA), reproduced for research purposes.
22
+
23
+ ## CPS 234 Information Security
24
+
25
+ - url: https://www.apra.gov.au/sites/default/files/cps_234_july_2019_for_public_release.pdf
26
+ - download date: 2026-06-17
27
+ - attribution: Crown copyright, Commonwealth of Australia (APRA), reproduced for research purposes.
28
+
29
+ ## CPS 230 Operational Risk Management
30
+
31
+ - url: https://www.apra.gov.au/sites/default/files/2023-07/Prudential%20Standard%20CPS%20230%20Operational%20Risk%20Management%20-%20clean.pdf
32
+ - download date: 2026-06-17
33
+ - attribution: Crown copyright, Commonwealth of Australia (APRA), reproduced for research purposes.
34
+
scripts/pull_apra.py ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Downloads APRA prudential standard PDFs directly from apra.gov.au.
3
+ Download only — does NOT parse or chunk.
4
+ """
5
+
6
+ from datetime import date
7
+ from pathlib import Path
8
+
9
+ import requests
10
+
11
+ DATA_DIR = Path(__file__).resolve().parent.parent / "data"
12
+
13
+ HEADERS = {
14
+ "User-Agent": (
15
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
16
+ "AppleWebKit/537.36 (KHTML, like Gecko) "
17
+ "Chrome/124.0.0.0 Safari/537.36"
18
+ )
19
+ }
20
+
21
+ ATTRIBUTION = (
22
+ "Crown copyright, Commonwealth of Australia (APRA), "
23
+ "reproduced for research purposes."
24
+ )
25
+
26
+ STANDARDS = [
27
+ {
28
+ "name": "CPS 220 Risk Management",
29
+ "url": "https://www.apra.gov.au/sites/default/files/Prudential-Standard-CPS-220-Risk-Management-(July-2017).pdf",
30
+ "filename": "cps220.pdf",
31
+ },
32
+ {
33
+ "name": "CPS 234 Information Security",
34
+ "url": "https://www.apra.gov.au/sites/default/files/cps_234_july_2019_for_public_release.pdf",
35
+ "filename": "cps234.pdf",
36
+ },
37
+ {
38
+ "name": "CPS 230 Operational Risk Management",
39
+ "url": "https://www.apra.gov.au/sites/default/files/2023-07/Prudential%20Standard%20CPS%20230%20Operational%20Risk%20Management%20-%20clean.pdf",
40
+ "filename": "cps230.pdf",
41
+ },
42
+ ]
43
+
44
+ DATA_DIR.mkdir(exist_ok=True)
45
+
46
+ today = date.today().isoformat()
47
+ provenance_path = DATA_DIR / "provenance.md"
48
+
49
+ for standard in STANDARDS:
50
+ response = requests.get(standard["url"], headers=HEADERS)
51
+ response.raise_for_status()
52
+
53
+ out_path = DATA_DIR / standard["filename"]
54
+ out_path.write_bytes(response.content)
55
+
56
+ print(f"{standard['name']}: saved {out_path} ({len(response.content)} bytes)")
57
+
58
+ with open(provenance_path, "a") as f:
59
+ f.write(f"## {standard['name']}\n\n")
60
+ f.write(f"- url: {standard['url']}\n")
61
+ f.write(f"- download date: {today}\n")
62
+ f.write(f"- attribution: {ATTRIBUTION}\n\n")
63
+
64
+ print(f"\nAppended provenance entries to {provenance_path}")