Metadata-Version: 2.4
Name: pybc365
Version: 0.2.1
Summary: A modern, fully typed Python client for Microsoft Dynamics 365 Business Central.
Keywords: business-central,dynamics-365,microsoft-dynamics,erp,api,odata,python
Author: Akshay Prabhu
Author-email: Akshay Prabhu <akshay.prabhu@konspec.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Dist: httpx>=0.28.1
Requires-Python: >=3.12
Project-URL: Homepage, https://github.com/konfpa/pybc365
Project-URL: Repository, https://github.com/konfpa/pybc365
Project-URL: Issues, https://github.com/konfpa/pybc365/issues
Description-Content-Type: text/markdown

# pybc365

**A modern, fully typed Python client for Microsoft Dynamics 365 Business Central.**

[![PyPI](https://img.shields.io/pypi/v/pybc365.svg?cacheSeconds=3600)](https://pypi.org/project/pybc365/)
[![Python versions](https://img.shields.io/pypi/pyversions/pybc365.svg?cacheSeconds=3600)](https://pypi.org/project/pybc365/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/konfpa/pybc365/blob/main/LICENSE)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)

> **This project is completely AI generated.** Every line of the code, the
> tests and the documentation was written by an AI agent. A human directed the
> work and reviewed it, but wrote none of it. Read the code before you depend
> on it.

Talking to Business Central from Python usually means hand-rolling OData
query strings, guessing which field came back as a string, and finding out
about a throttled request in production. `pybc365` replaces that with a small
typed API and one runtime dependency.

```python
customers = (
    client.service("Customers")
    .filter(F.Name.startswith("Contoso"), F.Blocked == "")
    .select("No", "Name", "Balance")
    .order_by(desc("Balance"))
)

for row in customers:
    print(row["No"], row["Name"], row["Balance"])
```

## Why pybc365

- **Reads like Python, not like OData.** Filters, ordering and projection are
  ordinary Python expressions. The library builds the query string.
- **Typed all the way through.** The package ships annotations and a
  `py.typed` marker, so your type checker understands every call.
- **Exact money.** Point it at `Decimal` and an `Edm.Decimal` keeps its digits
  instead of being rounded into a `float`.
- **Paging you never write.** Iterate the query. The library walks every page.
- **Survives a bad minute.** A retry policy handles throttled and dropped
  requests, and every failure raises one typed exception.
- **No assumptions about your tenant.** No baked-in entities, companies or
  environment configuration.
- **One runtime dependency.** `httpx`, and nothing else.

## Install

```bash
pip install pybc365
```

## Documentation

Full documentation lives in
[`docs/`](https://github.com/konfpa/pybc365/blob/main/docs/README.md):
tutorials, how-to guides, an FAQ, the complete API reference, and explanations
of the library's design decisions.

## Status

**v0.1 is sync, fully typed and read-only.** It reads published OData V4 web
services from one company on one server. Create, update, delete, an async
client and the `/api/v2.0` REST surface are not in this release. See the
[documentation](https://github.com/konfpa/pybc365/blob/main/docs/README.md) for
the exact boundaries.

## Contributing, security, license

[Contributing](https://github.com/konfpa/pybc365/blob/main/CONTRIBUTING.md)
· [Security](https://github.com/konfpa/pybc365/blob/main/SECURITY.md)
· [MIT License](https://github.com/konfpa/pybc365/blob/main/LICENSE)

`pybc365` is an independent open-source project. It is not affiliated with or
endorsed by Microsoft.
