Skip to main content

Odyn is a python client for Business Central Web Services API.

Project description

Odyn

Odyn is a modern, async-first Python client for Microsoft Dynamics 365 Business Central Web Services. It provides a high-level interface for extracting and interacting with data from Business Central using OData, handling the complexities of authentication, rate limiting, and data transformation.

Project Scope

This project was designed for personal use and follows an opinionated structure. It currently supports Business Central OData Web Services specifically. It is not intended for use with the standard Business Central API v2.0 endpoints.

Problem Solved

Integrating with Business Central Web Services often involves significant boilerplate for authentication, manual construction of OData queries, complex pagination logic, and data conversion. Odyn eliminates this overhead by providing a type-safe, fluent API that returns native Polars DataFrames, designed specifically for data engineering and high-performance integration tasks.

Capabilities

  • Async Execution: Built on httpx for high-performance asynchronous I/O.
  • Polars Integration: Native support for Polars DataFrames for efficient data processing.
  • Query Builder: Type-safe OData query builder with support for filters, expansions, and ordering.
  • Caching: Persistent Parquet-based caching with configurable TTL to reduce API load.
  • Resilience: Automatic retries with exponential backoff and configurable rate limiting (via aiolimiter).
  • Data Handling: Automatic pagination, streaming, and efficient batching for large datasets.

Dependencies

  • Python 3.12+
  • httpx
  • polars
  • aiolimiter

Installation

pip install odyn

Quick Example

import asyncio
from odyn import BCWebServiceClient, BasicAuth
from odyn.query import ODataQuery, F

async def main():
    async with BCWebServiceClient.create(
        server="https://bc-server:7048",
        instance="BC200",
        auth=BasicAuth("user", "password"),
        company="CRONUS",
    ) as client:
        # Fetch customers with balance > 1000
        query = ODataQuery().filter(F.Balance > 1000)
        df = await client.get("customers", query=query)
        print(df)

if __name__ == "__main__":
    asyncio.run(main())

Documentation

Comprehensive documentation is available in the docs/ directory:

Examples

Refer to the examples/ directory for functional examples covering various use cases:

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odyn-0.4.1.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odyn-0.4.1-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file odyn-0.4.1.tar.gz.

File metadata

  • Download URL: odyn-0.4.1.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for odyn-0.4.1.tar.gz
Algorithm Hash digest
SHA256 f76ea711c943f9d945c0ffd8c12f9841fb5051f5d22d8b88073c955e49f0eba0
MD5 853eb3b2947f1e5679e3f8ec2f5123a0
BLAKE2b-256 8716e5e6032b82e240b8c0b8741ceab7fa1d35a96c81e0276934f581bc499d68

See more details on using hashes here.

File details

Details for the file odyn-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: odyn-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for odyn-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a790b6fdc76c739f44155646f138c81fb86a0765dc0b3feae0a28db153b7a0f7
MD5 672b86b06739606f68da4a2d769b02b3
BLAKE2b-256 eea38fc280d4489ffd4942e6980a2b7cfa4a1724c2b9eaa8ecaa28bec124ba41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page