iraqdata 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
iraqdata/__init__.py ADDED
@@ -0,0 +1,102 @@
1
+ """
2
+ iraqdata
3
+ ========
4
+ Open, documented, and reproducible macroeconomic data package for Iraq.
5
+
6
+ Quickstart:
7
+ import iraqdata as id
8
+
9
+ # 1. Discover indicators
10
+ id.search("inflation")
11
+ id.list_series(category="money_banking")
12
+
13
+ # 2. Retrieve time-series data
14
+ df = id.get_series("m2")
15
+ df_fx = id.get_series(["official_rate", "parallel_rate"], start="2020-01-01")
16
+
17
+ # 3. Retrieve entire tables
18
+ df_fiscal = id.get_table("fiscal_annual")
19
+
20
+ # 4. Reproducibility: pin a release and see which data are in use
21
+ id.set_release("data-2026-10")
22
+ print(id.get_data_source())
23
+
24
+ # 5. Status flags next to values, and values as published on a past date
25
+ # (as_of needs a release that carries vintage history)
26
+ df_cpi = id.get_series("cpi", flags=True)
27
+ df_then = id.get_series("cpi", as_of="2026-10-28")
28
+ """
29
+
30
+ from iraqdata.catalog import (
31
+ get_catalog,
32
+ get_origin,
33
+ get_series_info,
34
+ list_categories,
35
+ list_series,
36
+ list_tables,
37
+ resolve_series_id,
38
+ search,
39
+ )
40
+ from iraqdata.client import get_series, get_table
41
+ from iraqdata.errors import (
42
+ ChecksumMismatchError,
43
+ FileNotInReleaseError,
44
+ FlagWarning,
45
+ IraqdataError,
46
+ NoVintageHistoryError,
47
+ ReleaseNotFoundError,
48
+ RepositoryNotFoundError,
49
+ UnverifiableFileError,
50
+ )
51
+ from iraqdata.schema import CANONICAL_COLUMNS, Observation, validate_dataframe
52
+ from iraqdata.storage import (
53
+ DataSource,
54
+ clear_cache,
55
+ get_active_release,
56
+ get_cache_dir,
57
+ get_data_source,
58
+ load_table,
59
+ refresh_latest,
60
+ resolve_table_path,
61
+ set_release,
62
+ )
63
+
64
+ __version__ = "1.0.0"
65
+
66
+ __all__ = [
67
+ # Primary user API
68
+ "get_series",
69
+ "get_table",
70
+ "list_series",
71
+ "search",
72
+ "get_series_info",
73
+ "get_origin",
74
+ "list_categories",
75
+ "list_tables",
76
+ "get_catalog",
77
+ "resolve_series_id",
78
+ # Storage & cache management
79
+ "set_release",
80
+ "get_active_release",
81
+ "get_data_source",
82
+ "refresh_latest",
83
+ "DataSource",
84
+ "clear_cache",
85
+ "get_cache_dir",
86
+ "load_table",
87
+ "resolve_table_path",
88
+ # Errors and warnings
89
+ "IraqdataError",
90
+ "RepositoryNotFoundError",
91
+ "ReleaseNotFoundError",
92
+ "FileNotInReleaseError",
93
+ "ChecksumMismatchError",
94
+ "UnverifiableFileError",
95
+ "NoVintageHistoryError",
96
+ "FlagWarning",
97
+ # Schema contract
98
+ "CANONICAL_COLUMNS",
99
+ "Observation",
100
+ "validate_dataframe",
101
+ "__version__",
102
+ ]