bc-cli 0.1.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.
Files changed (78) hide show
  1. bc_cli-0.1.0.dist-info/METADATA +224 -0
  2. bc_cli-0.1.0.dist-info/RECORD +78 -0
  3. bc_cli-0.1.0.dist-info/WHEEL +4 -0
  4. bc_cli-0.1.0.dist-info/entry_points.txt +2 -0
  5. bc_cli-0.1.0.dist-info/licenses/LICENSE +202 -0
  6. bc_cli-0.1.0.dist-info/licenses/NOTICE +10 -0
  7. bcli/__init__.py +44 -0
  8. bcli/_url.py +133 -0
  9. bcli/_version.py +1 -0
  10. bcli/auth/__init__.py +8 -0
  11. bcli/auth/_base.py +17 -0
  12. bcli/auth/_browser.py +234 -0
  13. bcli/auth/_credentials.py +169 -0
  14. bcli/auth/_device_code.py +90 -0
  15. bcli/auth/_secure_io.py +155 -0
  16. bcli/auth/_token_cache.py +93 -0
  17. bcli/auth/_workos.py +279 -0
  18. bcli/client/__init__.py +6 -0
  19. bcli/client/_async.py +566 -0
  20. bcli/client/_safety.py +179 -0
  21. bcli/client/_sync.py +171 -0
  22. bcli/client/_transport.py +303 -0
  23. bcli/config/__init__.py +6 -0
  24. bcli/config/_defaults.py +47 -0
  25. bcli/config/_loader.py +190 -0
  26. bcli/config/_model.py +206 -0
  27. bcli/errors.py +69 -0
  28. bcli/etl/__init__.py +63 -0
  29. bcli/etl/_auth.py +75 -0
  30. bcli/etl/_bridge.py +122 -0
  31. bcli/etl/_client.py +177 -0
  32. bcli/etl/_generic.py +220 -0
  33. bcli/etl/_polaris.py +170 -0
  34. bcli/etl/_stampers.py +74 -0
  35. bcli/odata/__init__.py +8 -0
  36. bcli/odata/_escape.py +32 -0
  37. bcli/odata/_filter_fields.py +137 -0
  38. bcli/odata/_pagination.py +42 -0
  39. bcli/odata/_query.py +117 -0
  40. bcli/odata/_response.py +46 -0
  41. bcli/py.typed +0 -0
  42. bcli/registry/__init__.py +12 -0
  43. bcli/registry/_importers.py +335 -0
  44. bcli/registry/_registry.py +148 -0
  45. bcli/registry/_schema.py +49 -0
  46. bcli/registry/standard_v2.json +85 -0
  47. bcli/telemetry/__init__.py +37 -0
  48. bcli/telemetry/_azure_monitor.py +103 -0
  49. bcli/telemetry/_factory.py +112 -0
  50. bcli/telemetry/_protocol.py +83 -0
  51. bcli/telemetry/events.py +271 -0
  52. bcli/workflow/__init__.py +19 -0
  53. bcli/workflow/_models.py +68 -0
  54. bcli/workflow/_resolver.py +131 -0
  55. bcli_cli/__init__.py +1 -0
  56. bcli_cli/_safety.py +73 -0
  57. bcli_cli/_state.py +113 -0
  58. bcli_cli/app.py +193 -0
  59. bcli_cli/commands/__init__.py +1 -0
  60. bcli_cli/commands/auth_cmd.py +182 -0
  61. bcli_cli/commands/batch_cmd.py +386 -0
  62. bcli_cli/commands/beautech_cmd.py +214 -0
  63. bcli_cli/commands/company_cmd.py +229 -0
  64. bcli_cli/commands/config_cmd.py +380 -0
  65. bcli_cli/commands/context_cmd.py +99 -0
  66. bcli_cli/commands/delete_cmd.py +52 -0
  67. bcli_cli/commands/endpoint_cmd.py +197 -0
  68. bcli_cli/commands/env_cmd.py +86 -0
  69. bcli_cli/commands/etl_cmd.py +218 -0
  70. bcli_cli/commands/get_cmd.py +266 -0
  71. bcli_cli/commands/patch_cmd.py +68 -0
  72. bcli_cli/commands/post_cmd.py +67 -0
  73. bcli_cli/commands/query_cmd.py +474 -0
  74. bcli_cli/commands/registry_cmd.py +135 -0
  75. bcli_cli/commands/test_cmd.py +95 -0
  76. bcli_cli/output/__init__.py +6 -0
  77. bcli_cli/output/_display.py +28 -0
  78. bcli_cli/output/_formatters.py +168 -0
@@ -0,0 +1,224 @@
1
+ Metadata-Version: 2.4
2
+ Name: bc-cli
3
+ Version: 0.1.0
4
+ Summary: Python SDK and CLI for Microsoft Dynamics 365 Business Central APIs
5
+ Project-URL: Homepage, https://github.com/igor-ctrl/bcli
6
+ Project-URL: Repository, https://github.com/igor-ctrl/bcli
7
+ Project-URL: Issues, https://github.com/igor-ctrl/bcli/issues
8
+ Project-URL: Documentation, https://github.com/igor-ctrl/bcli/tree/main/docs
9
+ Author: Igor
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Keywords: business-central,cli,dlt,dynamics-365,etl,odata,sdk
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: System Administrators
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Office/Business :: Financial :: Accounting
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: httpx>=0.27
26
+ Requires-Dist: msal>=1.28
27
+ Requires-Dist: pydantic>=2.0
28
+ Requires-Dist: tomlkit>=0.13
29
+ Provides-Extra: cli
30
+ Requires-Dist: keyring>=25.0; extra == 'cli'
31
+ Requires-Dist: pyyaml>=6.0; extra == 'cli'
32
+ Requires-Dist: rich>=13.0; extra == 'cli'
33
+ Requires-Dist: typer>=0.12; extra == 'cli'
34
+ Requires-Dist: workos>=5.0; extra == 'cli'
35
+ Provides-Extra: dev
36
+ Requires-Dist: keyring>=25.0; extra == 'dev'
37
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
38
+ Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
39
+ Requires-Dist: pytest>=8.0; extra == 'dev'
40
+ Requires-Dist: pyyaml>=6.0; extra == 'dev'
41
+ Requires-Dist: rich>=13.0; extra == 'dev'
42
+ Requires-Dist: ruff>=0.5; extra == 'dev'
43
+ Requires-Dist: typer>=0.12; extra == 'dev'
44
+ Requires-Dist: workos>=5.0; extra == 'dev'
45
+ Provides-Extra: etl
46
+ Requires-Dist: dlt[filesystem,parquet,s3]>=1.0; extra == 'etl'
47
+ Provides-Extra: polaris
48
+ Requires-Dist: dlt[filesystem,parquet,s3]>=1.0; extra == 'polaris'
49
+ Requires-Dist: pyarrow>=16.0; extra == 'polaris'
50
+ Requires-Dist: pyiceberg[s3fs]>=0.7; extra == 'polaris'
51
+ Provides-Extra: telemetry
52
+ Requires-Dist: azure-monitor-opentelemetry>=1.6; extra == 'telemetry'
53
+ Description-Content-Type: text/markdown
54
+
55
+ # bcli
56
+
57
+ [![Tests](https://github.com/igor-ctrl/bcli/actions/workflows/tests.yml/badge.svg)](https://github.com/igor-ctrl/bcli/actions/workflows/tests.yml)
58
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
59
+ [![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue.svg)](pyproject.toml)
60
+
61
+ A Python SDK and CLI for Microsoft Dynamics 365 Business Central APIs, with a built-in [dlt](https://dlthub.com) source for ETL backup pipelines.
62
+
63
+ ## SDK Quick Start
64
+
65
+ ```python
66
+ from bcli import AsyncBCClient
67
+
68
+ # Programmatic auth — no config files needed
69
+ async with AsyncBCClient(
70
+ tenant_id="your-tenant-id",
71
+ client_id="your-app-id",
72
+ client_secret="your-secret",
73
+ environment="Sandbox",
74
+ company_id="your-company-id",
75
+ ) as client:
76
+ # Query with fluent OData builder
77
+ customers = await client.query("customers").filter("city eq 'Chicago'").top(10).get()
78
+
79
+ # Write with safety gate
80
+ async with client.safe_write("Sandbox", "your-company-id") as sw:
81
+ await sw.post("salesInvoices", body={"customerNumber": "10000"}, domain="finance")
82
+ ```
83
+
84
+ Or use TOML profiles for the CLI and repeated SDK use:
85
+
86
+ ```python
87
+ from bcli import AsyncBCClient
88
+
89
+ async with AsyncBCClient(profile="production") as client:
90
+ vendors = await client.query("vendors").select("displayName", "balance").get()
91
+ ```
92
+
93
+ ## CLI Quick Start
94
+
95
+ ```bash
96
+ # Install (PyPI distribution name is "bc-cli"; the binary is "bcli")
97
+ pip install bc-cli
98
+ # or
99
+ uv tool install bc-cli
100
+
101
+ # Configure (interactive — discovers companies automatically)
102
+ bcli config init
103
+
104
+ # Query standard APIs immediately
105
+ bcli get customers --top 5
106
+ bcli get vendors --filter "displayName eq 'Fabrikam'" --format json
107
+ bcli get salesInvoices --select number,totalAmountIncludingTax --top 10
108
+
109
+ # Import custom APIs from a Postman collection
110
+ bcli registry import --from-postman ./my_collection.json
111
+
112
+ # Query custom endpoints (route auto-resolved)
113
+ bcli get myCustomEntities --top 5
114
+ ```
115
+
116
+ ## Features
117
+
118
+ - **Works out of the box** — 79 standard BC v2.0 entities (customers, vendors, items, GL entries, ...) with zero configuration beyond auth
119
+ - **Custom API support** — Import your custom API pages from Postman collections, JSON, or live `$metadata`
120
+ - **Three-tier endpoint resolution** — Custom registry -> standard v2.0 -> fuzzy suggestions
121
+ - **Multi-company** — Assign aliases to companies and query across all entities
122
+ - **OData query builder** — `--filter`, `--select`, `--expand`, `--orderby`, `--top`, `--skip` on every query
123
+ - **Multiple output formats** — table, JSON, CSV, NDJSON for pipeline use
124
+ - **Secure auth** — OS keychain integration (macOS Keychain, Windows Credential Manager), token caching, client credentials + device code flows
125
+ - **Write safety** — SafeContext gate prevents wrong-environment writes, enforces draft status on financial documents
126
+ - **Programmatic auth** — Pass credentials directly for MCP servers, Airflow DAGs, and containers (no config files required)
127
+ - **Batch operations** — Execute sequences of API calls from YAML files
128
+ - **ETL pipeline** — Built-in [dlt](https://dlthub.com) source for incremental backup to Parquet / DuckDB / Iceberg / Postgres
129
+ - **Structured logging** — JSON request logs with correlation IDs for observability
130
+
131
+ ## ETL Pipeline (dlt source)
132
+
133
+ Sync BC data incrementally to any [dlt-supported destination](https://dlthub.com/docs/dlt-ecosystem/destinations/) — useful as a Fivetran backup, a warehouse backfill tool, or a standalone ETL runner.
134
+
135
+ Standalone (any BC tenant, no bcli config required):
136
+
137
+ ```python
138
+ import dlt
139
+ from bcli.etl import business_central, EntityDef, fivetran_stamper
140
+
141
+ source = business_central(
142
+ tenant_id="...", client_id="...", client_secret="...",
143
+ environment="Production",
144
+ entities=[
145
+ EntityDef(name="customers"),
146
+ EntityDef(name="vendors"),
147
+ ],
148
+ multi_company=True, # iterate all BC companies
149
+ stampers=[fivetran_stamper()], # add _fivetran_synced / _fivetran_deleted
150
+ )
151
+
152
+ pipeline = dlt.pipeline(destination="duckdb", dataset_name="bc_raw")
153
+ pipeline.run(source)
154
+ ```
155
+
156
+ Or use the bcli bridge (reuses your profile and custom-API registry):
157
+
158
+ ```bash
159
+ # List entities the pipeline will sync
160
+ bcli --profile prod etl entities
161
+
162
+ # Incremental sync (uses systemModifiedAt cursor)
163
+ bcli --profile prod etl sync --destination filesystem
164
+
165
+ # Full refresh
166
+ bcli --profile prod etl sync --destination filesystem --full-refresh
167
+
168
+ # Schedule via cron (every 10 min incremental, nightly full refresh)
169
+ */10 * * * * bcli --profile prod etl sync --destination filesystem
170
+ 0 0 * * * bcli --profile prod etl sync --destination filesystem --full-refresh
171
+ ```
172
+
173
+ ## Installation
174
+
175
+ Requires Python 3.11+.
176
+
177
+ > **Heads-up on the package name.** The PyPI name is **`bc-cli`**, not
178
+ > `bcli`. An unrelated 2018-era package squats on the `bcli` name (an "EC2
179
+ > Cluster Creator" with no relation to this project) — `pip install bcli`
180
+ > will install that, not this. Always `pip install bc-cli`. Once installed,
181
+ > the import name (`import bcli`) and the CLI binary (`bcli`) work as
182
+ > documented.
183
+
184
+ ```bash
185
+ # SDK only (for libraries, MCP servers, Airflow DAGs)
186
+ pip install bc-cli
187
+
188
+ # SDK + CLI
189
+ pip install "bc-cli[cli]"
190
+
191
+ # SDK + ETL (dlt source for backup pipelines)
192
+ pip install "bc-cli[etl]"
193
+
194
+ # Everything
195
+ pip install "bc-cli[cli,etl]"
196
+
197
+ # Via uv (recommended)
198
+ uv tool install bc-cli
199
+
200
+ # From source
201
+ git clone https://github.com/igor-ctrl/bcli.git
202
+ cd bcli
203
+ pip install -e ".[dev,etl]"
204
+ ```
205
+
206
+ ## Documentation
207
+
208
+ | Guide | Description |
209
+ |-------|-------------|
210
+ | [Getting Started](docs/getting-started.md) | First-time setup, authentication, your first query |
211
+ | [Configuration](docs/configuration.md) | Profiles, environments, config file format |
212
+ | [Authentication](docs/authentication.md) | Client credentials, device code, OS keychain |
213
+ | [Querying Data](docs/querying.md) | GET, OData filters, pagination, output formats |
214
+ | [Write Operations](docs/write-operations.md) | POST, PATCH, DELETE |
215
+ | [Custom APIs](docs/custom-apis.md) | Importing from Postman, JSON, or $metadata |
216
+ | [Multi-Company](docs/multi-company.md) | Company aliases, cross-entity queries |
217
+ | [Batch Operations](docs/batch-operations.md) | YAML batch files |
218
+ | [SDK Usage](docs/sdk-usage.md) | Python SDK for developers and MCP servers |
219
+ | [Command Reference](docs/command-reference.md) | Complete CLI command reference |
220
+ | [Contributing](docs/contributing.md) | Development setup, architecture, testing |
221
+
222
+ ## License
223
+
224
+ MIT
@@ -0,0 +1,78 @@
1
+ bcli/__init__.py,sha256=1-NOLNs710SEECZh7ZTXgezydLY8ag3ok24SvAghCmM,965
2
+ bcli/_url.py,sha256=r8I6c1g7Y3zIsXjCc0_YPayLBk_ir71TyrVYMrgEmQw,4751
3
+ bcli/_version.py,sha256=kUR5RAFc7HCeiqdlX36dZOHkUI5wI6V_43RpEcD8b-0,22
4
+ bcli/errors.py,sha256=6TGZRdpERsCt4ojO4OMnHgFbboKwHAgsJ4xmDFUh9io,1771
5
+ bcli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ bcli/auth/__init__.py,sha256=7Oi5v58L7BD0yYYtG7_DBL47BoQ1IgUpwOJDwQ8WRjI,323
7
+ bcli/auth/_base.py,sha256=VV0VNMiSywHje-e2yp_fhuRGpgbKo-hT0WTFHd3vunE,386
8
+ bcli/auth/_browser.py,sha256=wrGCZ0UdXfSmEK7f9-teM92vchWTwGOBmR8_EDR0uzY,8570
9
+ bcli/auth/_credentials.py,sha256=NrEd_zaAPI1ThrZ7p9l0eLgZsh0KsuNidEIIZmsSuig,5395
10
+ bcli/auth/_device_code.py,sha256=BRWJaF4FhLrm0fTG6N8VSv1TAMfEzdj_xZf2JY2JfZo,3027
11
+ bcli/auth/_secure_io.py,sha256=vaHgyxFjAX67PpaLl2CI2Iv-sy5bFooZl7a4nDUEJiM,4950
12
+ bcli/auth/_token_cache.py,sha256=YUTGeALOHsSm1VZ8Nwr57F7yp7iHWR6dETfWIB6zvAc,3177
13
+ bcli/auth/_workos.py,sha256=rptU9e9Ik8DPveBzizeR8iu0dZNRQb7ta_WYAzEiBk0,10710
14
+ bcli/client/__init__.py,sha256=EvjzQ8C8zjdf2gUIBncAyeDTttxUvRqqTZChkK-X_Ag,162
15
+ bcli/client/_async.py,sha256=XeQGOm2He4uf_uvZRli-61FNrEs9eM2EErYbKHsEFp8,21047
16
+ bcli/client/_safety.py,sha256=wyDy7jAff6uzJlIChSY5HFRW-lQCDN2rwRGAbuoR1zg,5738
17
+ bcli/client/_sync.py,sha256=VO_p1dQhI2DWx4EGQv1Ie3xXUTWgmLtsQyrz2Yk6BQM,5140
18
+ bcli/client/_transport.py,sha256=dZwPeDR07wxTY-T-mwnuQWYpoK87eefBOrp-v-D_gsc,10391
19
+ bcli/config/__init__.py,sha256=KkAoDWesRC3BlPxjfR-6afxOQIeAcXvrYTN1x2o2ROI,243
20
+ bcli/config/_defaults.py,sha256=Yld3YgqWVohOdKnzCwal91HDq6m6lDEukQP6F8FauVo,1327
21
+ bcli/config/_loader.py,sha256=C5IL6tDXre44ySmScT1Vk62nHbbLHudSKx2REMxGhBk,6930
22
+ bcli/config/_model.py,sha256=pK4sJEgrgyHwmQlRwUoIGPPrGkf2AF3zvkgZ_DD-joc,7378
23
+ bcli/etl/__init__.py,sha256=PkE-g_Y7rkzUbsspt5oWjpt7O98_2s-Y26-p4xSvKnI,1741
24
+ bcli/etl/_auth.py,sha256=vRD7tIuC2nr50YvdRa5vqCsr3nM5zfdE_SwVZO5p87I,2348
25
+ bcli/etl/_bridge.py,sha256=na2AEAAccpjiABeetqXpEt6G5WEraTq2G_rGxlM5x80,4024
26
+ bcli/etl/_client.py,sha256=PdeVYwO8slE7ZONmv9nuW3iKYJ7dmfQg7svhvpQwgE4,6145
27
+ bcli/etl/_generic.py,sha256=C7UnZeugnboh4jdRRN5i3S1VhbncLcz4O_9HRnXJsC4,7218
28
+ bcli/etl/_polaris.py,sha256=aypIXDgD4Tna2mjMzdemAf3e3SeUJDYarNnFUbxcGr0,6283
29
+ bcli/etl/_stampers.py,sha256=5tM3GMS5qFW3vkMMqCVPDI-m83cFdd_vu1RPDGSzTyU,2448
30
+ bcli/odata/__init__.py,sha256=_KbPxClc_86oXaeqlZev2CPA5ocARdSpBofPvyG8uAg,310
31
+ bcli/odata/_escape.py,sha256=XqE3fdD40Bn9CP82jx0PRrgDwuENcYk-iFuapHRZCss,1245
32
+ bcli/odata/_filter_fields.py,sha256=gBdhb52MEqvmHdZ8MP8bN6AoUGRzkbZQMnwgUnj2en0,5127
33
+ bcli/odata/_pagination.py,sha256=7QZoufURz7_EKAiv6ueoi5xqyvPqwnPHZa7zx5I78pM,1395
34
+ bcli/odata/_query.py,sha256=8eK7myeTDjdlc1KteccJzsVEiIwnSNVzLIeX7UTgrA4,3297
35
+ bcli/odata/_response.py,sha256=itnchjRmsXcRwEhR3-g42D4j6TzmBjXBBJigBtu0rMo,1127
36
+ bcli/registry/__init__.py,sha256=VxdB1PcXtVlGOkGSfqAWbSr_cAjViEtmSNkG7vRuskM,340
37
+ bcli/registry/_importers.py,sha256=IOPqEj-mpiQvhEiG4dhL8yEYrkhje-RId75cf1YB3iU,11525
38
+ bcli/registry/_registry.py,sha256=eh5gSDhwcsccYzxka6bB4gddn_dGXdQ6ALA6tIYFlA0,5837
39
+ bcli/registry/_schema.py,sha256=y0-hDwnJqKOWWEn9zLUfVqVHcLFE_jgIVJ0JhH7CTBU,1549
40
+ bcli/registry/standard_v2.json,sha256=rEd4xj2-MjYIh2SFN-YzSat1jH-6Ioe9n6PsbekY4YY,15900
41
+ bcli/telemetry/__init__.py,sha256=HfzD2cBwZl6RPX49RcGN3kdVFZqN4d3lB7DhmSn3-ZU,1271
42
+ bcli/telemetry/_azure_monitor.py,sha256=jYNm7kVUUFdX_OfDklJXVqMbbabumrqMKkj1bdmpTAI,3880
43
+ bcli/telemetry/_factory.py,sha256=R8stOYzKq8ugLpIWVnFtqZ3sYK6L8MwUesVYgcdwJdE,3770
44
+ bcli/telemetry/_protocol.py,sha256=uZTKLAFSA0g8jXt8RyloUUBUrrm08U5G3cjI_5A1Teg,2654
45
+ bcli/telemetry/events.py,sha256=5Rl5dvIwTvu3ZEfmKJWp024p3IkQMWYO5N2AUDZ9O8U,8980
46
+ bcli/workflow/__init__.py,sha256=o5Sk_9qNJUnvPmj4Hu4eD6ePZ26TwsCVJkaMSSVfOyU,387
47
+ bcli/workflow/_models.py,sha256=3Q3dggyPaL8849DNsVShTLeucuDPl2jc5H_csnm3xEI,1927
48
+ bcli/workflow/_resolver.py,sha256=xRCAe_rLgOETn5s54yemlS6Bp3uLiVfEaJ8ZekL4irI,4377
49
+ bcli_cli/__init__.py,sha256=VvR5EpMUgh_-5OpftQKOvWauHBVGgfQODhjh9Ky5Q8E,69
50
+ bcli_cli/_safety.py,sha256=gTGwk2e8sw-k2l-ckUQbJJTArridJUDXpWif-zPUV6w,2507
51
+ bcli_cli/_state.py,sha256=DeYFke5XGWGHDEGJRaUalbZyqfRd9PCitVbUu-B919E,4079
52
+ bcli_cli/app.py,sha256=TTiyDtJu_j4nB0NW9OtUW9veNUKp3foJIotb8TT9_x4,7370
53
+ bcli_cli/commands/__init__.py,sha256=gQ6tnU0Rvm0-ESWFUBU-KDl5dpNOpUTG509hXOQQjwY,27
54
+ bcli_cli/commands/auth_cmd.py,sha256=KGyhIu8vBWMWqzywPlZ1XNEEvuqf-9-w8kW8PiU_Sk4,7066
55
+ bcli_cli/commands/batch_cmd.py,sha256=stXAkiNkB1lm6ilv5AtZyxAJc9eumCFe7AZLJMz41Lw,15789
56
+ bcli_cli/commands/beautech_cmd.py,sha256=_GwMOzWTOXmz46OzTdlmeZKKI6kZ-Lxzi2fU0GY5Pwk,8668
57
+ bcli_cli/commands/company_cmd.py,sha256=ASRfR7Pg7VxqYpLw7wykR6b0oamtvT9S5izh7_Rfl4c,7752
58
+ bcli_cli/commands/config_cmd.py,sha256=zHPETRdZ3jd3YjcAcf9Id69u7M6xbk_TRSTlfMGWnhU,14239
59
+ bcli_cli/commands/context_cmd.py,sha256=1YjkLW2NhT7kgJHDeoaEgpeHYuBDwcsEFzELc3cfc6o,2734
60
+ bcli_cli/commands/delete_cmd.py,sha256=jVkVR4XaUq3nom2r2tWiwfagaN2hHwpwe9wTv0bqHoE,1837
61
+ bcli_cli/commands/endpoint_cmd.py,sha256=VcXZD3BlVFbdsceHOhX3FC0tQI3KiASrr9PWRUUgXls,6660
62
+ bcli_cli/commands/env_cmd.py,sha256=XVv_63NB_kMxx4SDY26tvf4gDZiIQT22uoZfVW1SDVI,2793
63
+ bcli_cli/commands/etl_cmd.py,sha256=Ea16vnzxt0lg3coGXnC9HpAiLLRwYX2Ftk8CYTyRbwE,8532
64
+ bcli_cli/commands/get_cmd.py,sha256=XCBG8sa-K8KjW-OJziPlhhPpl5Cj6R05oyouxQwLcsQ,9642
65
+ bcli_cli/commands/patch_cmd.py,sha256=2orvj139XAn0UHYR-Z8Jt8rLFz76R2rsJMU1h8O_0gU,2396
66
+ bcli_cli/commands/post_cmd.py,sha256=10Xi3ErkPbhfX4NA-7BV5JN3ghGfs5q5NHecooqT394,2237
67
+ bcli_cli/commands/query_cmd.py,sha256=VMyobGOBj99QP6g6kH3CBMnap5IZ-Fqd5uv0LbTHuJE,17401
68
+ bcli_cli/commands/registry_cmd.py,sha256=lzjXPKW3T2CiiQ478Pxfb75aTvz7RsK07I_J0-GdTI8,5258
69
+ bcli_cli/commands/test_cmd.py,sha256=PzHxW868217tNaDmgQNlTY1UzBDZu_st7sVAfGDQls8,3147
70
+ bcli_cli/output/__init__.py,sha256=jQvFjW20EU1gL8JSnUrUdkkZgQ1ofq9o17mrXXAW9uY,247
71
+ bcli_cli/output/_display.py,sha256=a9D_9LIWiRd5xtiY57krqoXNdAVGossF6DSRzwKZJhM,774
72
+ bcli_cli/output/_formatters.py,sha256=HPYBvIG_geJLjyrjkaeObPtwevnpWuIokeRmt8wq9_4,5081
73
+ bc_cli-0.1.0.dist-info/METADATA,sha256=kZjf_F2k1WzBrQKAcmkxDCXKiHmDz8GFab_20J4VJ30,8783
74
+ bc_cli-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
75
+ bc_cli-0.1.0.dist-info/entry_points.txt,sha256=oX5A1NT9yYI_jXf_uRiAj0lPA9VV8G49k8SM-hcOxc8,42
76
+ bc_cli-0.1.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
77
+ bc_cli-0.1.0.dist-info/licenses/NOTICE,sha256=GiT5GfR4s1ypzAWOubbqsLz7BDnXecEapbkCtwpqtHo,311
78
+ bc_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ bcli = bcli_cli.app:app
@@ -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 [yyyy] [name of copyright owner]
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.
@@ -0,0 +1,10 @@
1
+ bcli
2
+ Copyright 2026 Igor
3
+
4
+ This product includes software developed by the bcli contributors.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
bcli/__init__.py ADDED
@@ -0,0 +1,44 @@
1
+ """bcli — Python SDK for Microsoft Dynamics 365 Business Central APIs."""
2
+
3
+ from bcli._version import __version__
4
+ from bcli.client import AsyncBCClient, BCClient
5
+ from bcli.client._safety import DomainRule, SafeContext
6
+ from bcli.config import BCConfig, load_config
7
+ from bcli.errors import (
8
+ AuthError,
9
+ BCLIError,
10
+ ConfigError,
11
+ ForbiddenError,
12
+ NotFoundError,
13
+ RegistryError,
14
+ SafetyError,
15
+ ServerError,
16
+ ThrottledError,
17
+ ValidationError,
18
+ WorkflowError,
19
+ )
20
+ from bcli.odata import Query
21
+ from bcli.registry import EndpointRegistry
22
+
23
+ __all__ = [
24
+ "__version__",
25
+ "AsyncBCClient",
26
+ "AuthError",
27
+ "BCLIError",
28
+ "BCClient",
29
+ "BCConfig",
30
+ "ConfigError",
31
+ "DomainRule",
32
+ "EndpointRegistry",
33
+ "ForbiddenError",
34
+ "NotFoundError",
35
+ "Query",
36
+ "RegistryError",
37
+ "SafeContext",
38
+ "SafetyError",
39
+ "ServerError",
40
+ "ThrottledError",
41
+ "ValidationError",
42
+ "WorkflowError",
43
+ "load_config",
44
+ ]