sdmxlib 0.71.0__tar.gz → 0.72.1__tar.gz

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.
Files changed (170) hide show
  1. sdmxlib-0.72.1/LICENSE +202 -0
  2. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/PKG-INFO +11 -7
  3. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/README.md +5 -3
  4. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/pyproject.toml +12 -5
  5. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/pyproject.toml.orig +21 -8
  6. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/__init__.py +8 -2
  7. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/api/federated.py +2 -2
  8. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/api/registry.py +11 -11
  9. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/api/session.py +1 -1
  10. sdmxlib-0.72.1/src/sdmxlib/bundle/__init__.py +99 -0
  11. sdmxlib-0.72.1/src/sdmxlib/bundle/_check.py +217 -0
  12. sdmxlib-0.72.1/src/sdmxlib/bundle/_fetch.py +161 -0
  13. sdmxlib-0.72.1/src/sdmxlib/bundle/_overlay.py +378 -0
  14. sdmxlib-0.72.1/src/sdmxlib/bundle/_write.py +109 -0
  15. sdmxlib-0.72.1/src/sdmxlib/bundle/manifest.schema.json +212 -0
  16. sdmxlib-0.72.1/src/sdmxlib/bundle/overlay.schema.json +127 -0
  17. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/data_store.py +1 -2
  18. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/__init__.py +9 -10
  19. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/gaps.py +4 -4
  20. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/_data_common.py +1 -1
  21. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/local/data_store.py +37 -7
  22. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/local/registry.py +78 -25
  23. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/local/sql.py +3 -3
  24. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_items.py +1 -1
  25. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/annotations.py +2 -2
  26. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/base.py +5 -6
  27. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/binding.py +1 -1
  28. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/category.py +1 -1
  29. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/codelist.py +13 -13
  30. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/concept.py +3 -3
  31. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/constraint.py +14 -18
  32. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/convert.py +1 -1
  33. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/datastructure.py +5 -7
  34. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/errors.py +5 -5
  35. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/expr.py +2 -2
  36. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/hierarchy.py +6 -6
  37. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/in_memory_registry.py +7 -8
  38. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/istring.py +1 -1
  39. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/mapping.py +11 -11
  40. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/message.py +14 -14
  41. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/metadataflow.py +2 -2
  42. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/metadatastructure.py +1 -1
  43. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/organisation.py +14 -14
  44. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/ref.py +3 -3
  45. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/representation.py +1 -1
  46. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/rollup.py +3 -3
  47. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/urn.py +2 -4
  48. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/validation.py +36 -15
  49. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/polars.py +3 -3
  50. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_expr.py +17 -18
  51. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_pushdown.py +1 -1
  52. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/accessors.py +0 -2
  53. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/observations.py +10 -11
  54. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/query.py +17 -19
  55. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/rest.py +3 -3
  56. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/session.py +8 -8
  57. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/sql.py +1 -1
  58. sdmxlib-0.72.1/src/sdmxlib/storage/_manifest.py +184 -0
  59. sdmxlib-0.72.1/src/sdmxlib/storage/_synthetic.py +46 -0
  60. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/storage/lazy.py +23 -29
  61. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/storage/schema.py +1 -1
  62. sdmxlib-0.72.1/src/sdmxlib/testing.py +373 -0
  63. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/versions.py +1 -1
  64. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/_duckdb.py +0 -0
  65. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/_singleflight.py +0 -0
  66. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/_time.py +0 -0
  67. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/api/__init__.py +0 -0
  68. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/api/_freshness.py +0 -0
  69. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/api/client.py +0 -0
  70. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/api/policy.py +0 -0
  71. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/api/providers.py +0 -0
  72. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/builders/__init__.py +0 -0
  73. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/builders/contentconstraint.py +0 -0
  74. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/builders/metadata_annotation.py +0 -0
  75. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/_arrow.py +0 -0
  76. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/_attachment.py +0 -0
  77. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/_coerce.py +0 -0
  78. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/_index.py +0 -0
  79. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/_positions.py +0 -0
  80. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/_refuse.py +0 -0
  81. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/data_format.py +0 -0
  82. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_csv/__init__.py +0 -0
  83. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_csv/reader.py +0 -0
  84. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_csv/writer.py +0 -0
  85. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/__init__.py +0 -0
  86. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/_dto.py +0 -0
  87. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/_header.py +0 -0
  88. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/_losses.py +0 -0
  89. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/_periods.py +0 -0
  90. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/_resolve.py +0 -0
  91. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/_structure_dto.py +0 -0
  92. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/_structure_ingest.py +0 -0
  93. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/data.py +0 -0
  94. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/data_v1.py +0 -0
  95. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/data_v2.py +0 -0
  96. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/metadata.py +0 -0
  97. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/reader.py +0 -0
  98. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/structure_values.py +0 -0
  99. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json/writer.py +0 -0
  100. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json_1_0/__init__.py +0 -0
  101. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_json_1_0/writer.py +0 -0
  102. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml/__init__.py +0 -0
  103. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml/_allowed_children.py +0 -0
  104. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml/_closed_world.py +0 -0
  105. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml/_common.py +0 -0
  106. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml/_header.py +0 -0
  107. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml/_losses.py +0 -0
  108. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml/_v3_reader.py +0 -0
  109. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml/_v3_writer.py +0 -0
  110. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml21/__init__.py +0 -0
  111. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml21/_providers.py +0 -0
  112. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml21/_synthetic.py +0 -0
  113. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml21/namespaces.py +0 -0
  114. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml21/reader.py +0 -0
  115. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml21/writer.py +0 -0
  116. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml30/__init__.py +0 -0
  117. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml30/metadata.py +0 -0
  118. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml30/namespaces.py +0 -0
  119. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml30/reader.py +0 -0
  120. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml30/writer.py +0 -0
  121. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml31/__init__.py +0 -0
  122. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml31/namespaces.py +0 -0
  123. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml31/reader.py +0 -0
  124. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/formats/sdmx_ml31/writer.py +0 -0
  125. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/local/__init__.py +0 -0
  126. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/local/_scan.py +0 -0
  127. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/__init__.py +0 -0
  128. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_binding.py +0 -0
  129. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_container.py +0 -0
  130. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_invariants.py +0 -0
  131. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_label_match.py +0 -0
  132. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_rebind.py +0 -0
  133. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_referenceable.py +0 -0
  134. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_refshape.py +0 -0
  135. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_resolvers.py +0 -0
  136. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_rules.py +0 -0
  137. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/_tree.py +0 -0
  138. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/collections.py +0 -0
  139. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/dataflow.py +0 -0
  140. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/header.py +0 -0
  141. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/link.py +0 -0
  142. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/metadata_provision.py +0 -0
  143. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/metadataset.py +0 -0
  144. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/provision.py +0 -0
  145. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/registry.py +0 -0
  146. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/rest_api.py +0 -0
  147. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/valuelist.py +0 -0
  148. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/version.py +0 -0
  149. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/model/version_rewrite.py +0 -0
  150. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/py.typed +0 -0
  151. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/__init__.py +0 -0
  152. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_closure.py +0 -0
  153. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_common.py +0 -0
  154. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_compile.py +0 -0
  155. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_edges.py +0 -0
  156. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_execute.py +0 -0
  157. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_joins.py +0 -0
  158. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_plan.py +0 -0
  159. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_rebase.py +0 -0
  160. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/_rest.py +0 -0
  161. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/raw.py +0 -0
  162. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/query/schema.py +0 -0
  163. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/storage/__init__.py +0 -0
  164. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/storage/_checked.py +0 -0
  165. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/storage/_kinds.py +0 -0
  166. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/storage/_parsed.py +0 -0
  167. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/storage/_projections.py +0 -0
  168. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/storage/readers.py +0 -0
  169. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/storage/resolve.py +0 -0
  170. {sdmxlib-0.71.0 → sdmxlib-0.72.1}/src/sdmxlib/storage/writers.py +0 -0
sdmxlib-0.72.1/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 gabrielgellner
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -1,11 +1,12 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: sdmxlib
3
- Version: 0.71.0
4
- Summary: SDMX structural metadata library for Python
3
+ Version: 0.72.1
4
+ Summary: SDMX for Python: structures, reference metadata and observation data, from REST, files or a local DuckDB store.
5
5
  Keywords: sdmx,statistics,metadata,datastructure
6
6
  Author: gabrielgellner
7
7
  Author-email: gabrielgellner <gabrielgellner@gmail.com>
8
- License: Apache-2.0
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
9
10
  Classifier: Development Status :: 4 - Beta
10
11
  Classifier: Intended Audience :: Developers
11
12
  Classifier: Intended Audience :: Science/Research
@@ -25,6 +26,7 @@ Project-URL: Homepage, https://github.com/StatCat-Suite/sdmxlib
25
26
  Project-URL: Repository, https://github.com/StatCat-Suite/sdmxlib
26
27
  Project-URL: Documentation, https://statcat-suite.github.io/sdmxlib
27
28
  Project-URL: Changelog, https://github.com/StatCat-Suite/sdmxlib/blob/main/CHANGELOG.md
29
+ Project-URL: Issue Tracker, https://github.com/StatCat-Suite/sdmxlib/issues
28
30
  Description-Content-Type: text/markdown
29
31
 
30
32
  # sdmxlib
@@ -33,9 +35,11 @@ Description-Content-Type: text/markdown
33
35
  > (Claude Code). Users who are not comfortable with AI-generated code should
34
36
  > take that into account before adopting it.
35
37
 
36
- SDMX structural metadata library for Python. Fetch and navigate Data Structure
37
- Definitions, Codelists, Dataflows, and related artefacts from any SDMX REST
38
- endpoint — with plain attribute access, no XML or URN chasing required.
38
+ SDMX for Python: structures, reference metadata and observation data, from
39
+ REST, files or a local DuckDB store. Navigate Data Structure Definitions,
40
+ Codelists, Dataflows and related artefacts with plain attribute access, query
41
+ catalogues and observations with one path language, and read and write SDMX-ML,
42
+ SDMX-JSON and SDMX-CSV.
39
43
 
40
44
  ## Quick start
41
45
 
@@ -4,9 +4,11 @@
4
4
  > (Claude Code). Users who are not comfortable with AI-generated code should
5
5
  > take that into account before adopting it.
6
6
 
7
- SDMX structural metadata library for Python. Fetch and navigate Data Structure
8
- Definitions, Codelists, Dataflows, and related artefacts from any SDMX REST
9
- endpoint — with plain attribute access, no XML or URN chasing required.
7
+ SDMX for Python: structures, reference metadata and observation data, from
8
+ REST, files or a local DuckDB store. Navigate Data Structure Definitions,
9
+ Codelists, Dataflows and related artefacts with plain attribute access, query
10
+ catalogues and observations with one path language, and read and write SDMX-ML,
11
+ SDMX-JSON and SDMX-CSV.
10
12
 
11
13
  ## Quick start
12
14
 
@@ -1,8 +1,10 @@
1
1
  [project]
2
2
  name = "sdmxlib"
3
- version = "0.71.0"
4
- description = "SDMX structural metadata library for Python"
3
+ version = "0.72.1"
4
+ description = "SDMX for Python: structures, reference metadata and observation data, from REST, files or a local DuckDB store."
5
5
  readme = "README.md"
6
+ license = "Apache-2.0"
7
+ license-files = ["LICENSE"]
6
8
  requires-python = ">=3.14"
7
9
  keywords = [
8
10
  "sdmx",
@@ -29,9 +31,6 @@ dependencies = [
29
31
  "typing-extensions>=4.16.0",
30
32
  ]
31
33
 
32
- [project.license]
33
- text = "Apache-2.0"
34
-
35
34
  [[project.authors]]
36
35
  name = "gabrielgellner"
37
36
  email = "gabrielgellner@gmail.com"
@@ -41,6 +40,7 @@ Homepage = "https://github.com/StatCat-Suite/sdmxlib"
41
40
  Repository = "https://github.com/StatCat-Suite/sdmxlib"
42
41
  Documentation = "https://statcat-suite.github.io/sdmxlib"
43
42
  Changelog = "https://github.com/StatCat-Suite/sdmxlib/blob/main/CHANGELOG.md"
43
+ "Issue Tracker" = "https://github.com/StatCat-Suite/sdmxlib/issues"
44
44
 
45
45
  [build-system]
46
46
  requires = ["uv_build>=0.13.0,<0.14.0"]
@@ -97,8 +97,15 @@ mutate_only_covered_lines = false
97
97
  process_isolation = "forkserver"
98
98
  forkserver_warmup = "none"
99
99
 
100
+ [tool.uv.workspace]
101
+ members = ["cli"]
102
+
103
+ [tool.uv.sources.sdmxlib-cli]
104
+ workspace = true
105
+
100
106
  [dependency-groups]
101
107
  dev = [
108
+ "sdmxlib-cli",
102
109
  "catppuccin[pygments]>=2.5.0",
103
110
  "types-lxml>=2025.3.30",
104
111
  "types-jsonschema>=4.21.0",
@@ -1,9 +1,10 @@
1
1
  [project]
2
2
  name = "sdmxlib"
3
- version = "0.71.0"
4
- description = "SDMX structural metadata library for Python"
3
+ version = "0.72.1"
4
+ description = "SDMX for Python: structures, reference metadata and observation data, from REST, files or a local DuckDB store."
5
5
  readme = "README.md"
6
- license = { text = "Apache-2.0" }
6
+ license = "Apache-2.0"
7
+ license-files = ["LICENSE"]
7
8
  authors = [{ name = "gabrielgellner", email = "gabrielgellner@gmail.com" }]
8
9
  requires-python = ">=3.14"
9
10
  keywords = ["sdmx", "statistics", "metadata", "datastructure"]
@@ -47,6 +48,7 @@ Homepage = "https://github.com/StatCat-Suite/sdmxlib"
47
48
  Repository = "https://github.com/StatCat-Suite/sdmxlib"
48
49
  Documentation = "https://statcat-suite.github.io/sdmxlib"
49
50
  Changelog = "https://github.com/StatCat-Suite/sdmxlib/blob/main/CHANGELOG.md"
51
+ "Issue Tracker" = "https://github.com/StatCat-Suite/sdmxlib/issues"
50
52
 
51
53
  [build-system]
52
54
  requires = ["uv_build>=0.13.0,<0.14.0"]
@@ -103,12 +105,15 @@ exclude_lines = [
103
105
 
104
106
  [dependency-groups]
105
107
  dev = [
108
+ # The CLI, a workspace member released with sdmxlib (GH-67): installed here so
109
+ # its tests run in `just ci` with everything else.
110
+ "sdmxlib-cli",
106
111
  # Checker versions carry UPPER bounds. uv.lock is gitignored (published
107
- # library), so CI resolves the dev group fresh on every pipeline — an
108
- # unbounded floor means a checker release lands in CI unannounced. With
109
- # ruff on `select = ["ALL"]` that is not hypothetical: ruff 0.16.0
110
- # stabilised 12 preview rules and would have turned CI red with no commit
111
- # of ours in between. Bump these deliberately, in their own MR.
112
+ # library), so every fresh `uv sync` resolves the dev group anew — an
113
+ # unbounded floor means a checker release lands in `just ci` unannounced.
114
+ # With ruff on `select = ["ALL"]` that is not hypothetical: ruff 0.16.0
115
+ # stabilised 12 preview rules and would have turned the gate red with no
116
+ # commit of ours in between. Bump these deliberately, in their own PR.
112
117
  "catppuccin[pygments]>=2.5.0",
113
118
  "types-lxml>=2025.3.30",
114
119
  # Stubs for the two untyped test-only imports, so pyrefly checks tests/ without
@@ -225,3 +230,11 @@ process_isolation = "forkserver"
225
230
  # never mutated. Its mutants are booked as survivors: 282 for `_v3_writer.py`,
226
231
  # where a fresh process kills `__init__`'s outright (#458).
227
232
  forkserver_warmup = "none"
233
+
234
+ [tool.uv.workspace]
235
+ # `cli/` is `sdmxlib-cli`, the command line, a separate distribution so the
236
+ # library never depends on typer (GH-67).
237
+ members = ["cli"]
238
+
239
+ [tool.uv.sources]
240
+ sdmxlib-cli = { workspace = true }
@@ -1,4 +1,8 @@
1
- """sdmxlib — SDMX structural metadata library for Python."""
1
+ """sdmxlib — SDMX for Python.
2
+
3
+ Structures, reference metadata and observation data, from REST, files or a
4
+ local DuckDB store.
5
+ """
2
6
 
3
7
  from sdmxlib.api.federated import FederatedRegistry
4
8
  from sdmxlib.api.policy import RegistryUnavailable
@@ -49,6 +53,7 @@ from sdmxlib.rest import ComponentFilter, parse_components, widen_key
49
53
  from sdmxlib.query._common import Descending
50
54
  from sdmxlib.model.convert import from_dict, to_dict
51
55
  from sdmxlib.model.errors import ImRuleWarning, ReadAssumption, ReadGap, SdmxWarning
56
+ from sdmxlib.storage._manifest import ManifestError
52
57
  from sdmxlib.storage.schema import StoreSchemaError
53
58
  from sdmxlib.model.validation import (
54
59
  LossyReadError,
@@ -199,7 +204,7 @@ def len[R: RowKind]() -> Agg[R]: # noqa: A001 - polars' `pl.len()`; nothing in
199
204
  """The number of rows, as an aggregate — `count(*)`, named for polars' `pl.len()`.
200
205
 
201
206
  For `Query.agg`, which folds a whole query into one row, so the row count
202
- can come out of the same scan as the other aggregates (#414):
207
+ can come out of the same scan as the other aggregates:
203
208
 
204
209
  obs.agg(SEX=obs.col("SEX").unique(), n=sl.len())
205
210
 
@@ -326,6 +331,7 @@ __all__ = [
326
331
  "LossyReadError",
327
332
  "Maintainable",
328
333
  "MaintainableArtefact",
334
+ "ManifestError",
329
335
  "Measure",
330
336
  "MeasureDimension",
331
337
  "MemberValue",
@@ -174,13 +174,13 @@ class FederatedRegistry:
174
174
  Args:
175
175
  target: Identity of the artefact to read — a URN, or a `Ref`
176
176
  naming one. Routing reads the *agency* off it, so a `Ref`
177
- had to be unwrapped before this could route at all (#370).
177
+ had to be unwrapped before this could route at all.
178
178
  resolve: How deep to follow references. `True` for every
179
179
  reference, a sequence of artefact types for only those.
180
180
  partial: `False` asks for untrimmed codelists.
181
181
  expect: The class the caller requires. The artefact is returned
182
182
  when it is an instance, `None` otherwise — see
183
- `RestRegistry.get` for why this exists (#406).
183
+ `RestRegistry.get` for why this exists.
184
184
 
185
185
  Raises:
186
186
  KeyError: If no source is routed for the URN's agency.
@@ -173,13 +173,13 @@ class RestRegistry:
173
173
  fetched (default 256). Bounds the fetch cache; eviction only
174
174
  means a later identical query fetches again.
175
175
  latest_ttl: Seconds a `latest` answer may be reused without asking,
176
- *at minimum* (#339). A floor over what the provider's
176
+ *at minimum*. A floor over what the provider's
177
177
  `Cache-Control` allows, never a ceiling: it can rescue a provider
178
178
  whose `no-store` is appliance boilerplate, and cannot shorten a
179
179
  generous one. Defaults to 0 — obey the provider exactly. Wanting
180
180
  *less* is spelled with a pinned URN, which is not a pointer.
181
- csv_media_type: The ``Accept`` `obs` fetches observations with
182
- (GH-50). Defaults to the `ProviderInfo`'s, else the SDMX-CSV the
181
+ csv_media_type: The ``Accept`` `obs` fetches observations with.
182
+ Defaults to the `ProviderInfo`'s, else the SDMX-CSV the
183
183
  API version defines: 1.0 for 2.1, 2.0 for 3.0. Providers differ —
184
184
  ECB serves CSV only for ``text/csv``, Eurostat only for SDMX-CSV
185
185
  1.0 — so pass one when a bare URL's provider refuses the default.
@@ -209,7 +209,7 @@ class RestRegistry:
209
209
  Example:
210
210
  # Cache-mode federation: structural reads cached locally. A cache can
211
211
  # be fetched again, so it may be rebuilt when sdmxlib's store schema
212
- # moves; any other store on an old schema is refused instead (GH-57).
212
+ # moves; any other store on an old schema is refused instead.
213
213
  with (
214
214
  sl.LocalRegistry("cache.duckdb", rebuild=True) as local,
215
215
  sl.RestRegistry(sl.Provider.ECB, store=local) as reg,
@@ -301,7 +301,7 @@ class RestRegistry:
301
301
  """The `InMemoryRegistry` populated by every artefact fetched so far.
302
302
 
303
303
  Artefacts from all ``get()``, ``query()``, ``fetch()``, and
304
- ``resolve()`` calls accumulate here, every Ref bound to it (#492). Cross-request
304
+ ``resolve()`` calls accumulate here, every Ref bound to it. Cross-request
305
305
  Ref resolution happens automatically — a codelist fetched in one
306
306
  request resolves dimension Refs in a DSD fetched in another.
307
307
 
@@ -356,7 +356,7 @@ class RestRegistry:
356
356
 
357
357
  @property
358
358
  def refused(self) -> tuple[Refusal, ...]:
359
- """Artefacts a provider served that this registry refused, each with why (#419).
359
+ """Artefacts a provider served that this registry refused, each with why.
360
360
 
361
361
  A registry's document is read artefact by artefact: one that
362
362
  contradicts the schema, or breaks a rule `add` enforces, is left out
@@ -616,7 +616,7 @@ class RestRegistry:
616
616
  # ── Generic entry points ──────────────────────────────────────────────────
617
617
 
618
618
  def query[R: "RowKind", A](self, root: Cols[R, A]) -> Query[R, A]:
619
- """A lazy query over the relation `root` names, served over HTTP (#312).
619
+ """A lazy query over the relation `root` names, served over HTTP.
620
620
 
621
621
  The same entry point and the same language as `LocalRegistry.query`. What
622
622
  differs is where the rows come from: this plans the query against what
@@ -809,7 +809,7 @@ class RestRegistry:
809
809
 
810
810
  Args:
811
811
  target: A URN, or a `Ref` from graph traversal. Positional-only,
812
- and the same two types every other `get` takes since #370.
812
+ and the same two types every other `get` takes.
813
813
  resolve: `False` for a skeleton, `True` for every reference, or a
814
814
  sequence of artefact types to follow only those.
815
815
  partial: When resolving, trim referenced ItemSchemes by their
@@ -817,9 +817,9 @@ class RestRegistry:
817
817
  expect: The class the caller requires — the artefact is returned
818
818
  when it is an instance, `None` otherwise. See below.
819
819
 
820
- **`expect=` names the class and gets that class or None (#406).** A URN
820
+ **`expect=` names the class and gets that class or None.** A URN
821
821
  parsed from a string carries no type a checker can use, and what one
822
- checker infers for `get(parse(...))` is not what another does (#399).
822
+ checker infers for `get(parse(...))` is not what another does.
823
823
  Passing the class states the expectation where the caller holds it:
824
824
 
825
825
  reg.get(SdmxUrn.parse(text), expect=MetadataSet) # MetadataSet | None
@@ -833,7 +833,7 @@ class RestRegistry:
833
833
 
834
834
  Raises:
835
835
  SdmxConformanceError: If the provider served the artefact and it
836
- was refused (#419) — see `refused`.
836
+ was refused — see `refused`.
837
837
  """
838
838
  urn = target_urn(target)
839
839
  try:
@@ -152,7 +152,7 @@ class Session:
152
152
  """A cached artefact, if it is known at least this completely.
153
153
 
154
154
  `None` otherwise — including when the artefact *is* held but less
155
- completely than asked, which is the whole point: that case must go to
155
+ completely than asked. That case must go to
156
156
  the provider, and returning the shallower object is #344.
157
157
 
158
158
  Same `latest` rule as `get` — see there for why.
@@ -0,0 +1,99 @@
1
+ """A bundle as a published artefact: its manifest, and what identifies it.
2
+
3
+ `LocalRegistry.bundle` opens the layout — ``meta.duckdb``, ``lake.ducklake``,
4
+ ``parquet/`` — and this names what a given bundle is. `write_manifest`
5
+ publishes one: a file inventory with a sha256 per file, observation counts per
6
+ binding, and a fresh ``token``, the value a cache or an ETag keys on.
7
+ `read_manifest` reads it back, refusing a format it cannot read, and
8
+ `check_bundle` checks a bundle against it and against itself, and
9
+ `fetch_bundle` lands one dataflow from an SDMX REST source as a published
10
+ bundle, its provenance recorded. `apply_overlays` changes display annotations
11
+ without a rebuild, `effective_token` is what a cache keys on when it does, and
12
+ `fold_overlays` writes overlays into a bundle for good. The manifest's
13
+ JSON Schema ships beside it, for producers outside Python: `manifest_schema`.
14
+
15
+ From a shell, ``sdmxlib bundle check PATH`` and ``sdmxlib bundle fetch`` run
16
+ these: they are the
17
+ ``sdmxlib-cli`` package (``uv tool install sdmxlib-cli``), released with this one,
18
+ so the library itself never depends on typer.
19
+
20
+ Example:
21
+ from sdmxlib.bundle import Producer, write_manifest
22
+
23
+ manifest = write_manifest("out/cenprof", bundle_id="cenprof-2021",
24
+ producer=Producer(name="my-builder", version="1.2"))
25
+ with sl.LocalRegistry.bundle("out/cenprof", require_manifest=True) as reg:
26
+ reg.manifest.token
27
+ """
28
+
29
+ from importlib import resources
30
+
31
+ from sdmxlib.bundle._check import Check, Finding, Report, check_bundle
32
+ from sdmxlib.bundle._fetch import fetch_bundle
33
+ from sdmxlib.bundle._overlay import (
34
+ OVERLAY_FORMAT,
35
+ Merge,
36
+ Overlay,
37
+ OverlayAnnotation,
38
+ OverlayEntry,
39
+ OverlayError,
40
+ apply_overlays,
41
+ effective_token,
42
+ fold_overlays,
43
+ overlay_digest,
44
+ read_overlay,
45
+ )
46
+ from sdmxlib.bundle._write import inventory, write_manifest
47
+ from sdmxlib.storage._manifest import (
48
+ FORMAT_VERSION,
49
+ MANIFEST_NAME,
50
+ BindingCount,
51
+ BundleFile,
52
+ Manifest,
53
+ ManifestError,
54
+ Producer,
55
+ Provenance,
56
+ read_manifest,
57
+ )
58
+
59
+ __all__ = [
60
+ "FORMAT_VERSION",
61
+ "MANIFEST_NAME",
62
+ "OVERLAY_FORMAT",
63
+ "BindingCount",
64
+ "BundleFile",
65
+ "Check",
66
+ "Finding",
67
+ "Manifest",
68
+ "ManifestError",
69
+ "Merge",
70
+ "Overlay",
71
+ "OverlayAnnotation",
72
+ "OverlayEntry",
73
+ "OverlayError",
74
+ "Producer",
75
+ "Provenance",
76
+ "Report",
77
+ "apply_overlays",
78
+ "check_bundle",
79
+ "effective_token",
80
+ "fetch_bundle",
81
+ "fold_overlays",
82
+ "inventory",
83
+ "manifest_schema",
84
+ "overlay_digest",
85
+ "overlay_schema",
86
+ "read_manifest",
87
+ "read_overlay",
88
+ "write_manifest",
89
+ ]
90
+
91
+
92
+ def overlay_schema() -> bytes:
93
+ """The JSON Schema for an overlay document, as shipped (`overlay.schema.json`)."""
94
+ return resources.files(__package__).joinpath("overlay.schema.json").read_bytes()
95
+
96
+
97
+ def manifest_schema() -> bytes:
98
+ """The JSON Schema for ``bundle.manifest.json``, as shipped (`manifest.schema.json`)."""
99
+ return resources.files(__package__).joinpath("manifest.schema.json").read_bytes()