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.
  • Data Handling: Automatic pagination, streaming, and efficient batching for large datasets.

Dependencies

  • Python 3.12+
  • httpx
  • polars

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.2.0.tar.gz (24.9 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.2.0-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: odyn-0.2.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","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.2.0.tar.gz
Algorithm Hash digest
SHA256 69353911f4e9959f5038403d0e026f88519520ac3b99b1544750cc04c57bf1a0
MD5 7ffcc72f378cfdbc612b8790614b099c
BLAKE2b-256 3304809c5c458c2a45c4e9b564bc26ccb3599ad18079f0651b53af7e104ef506

See more details on using hashes here.

File details

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

File metadata

  • Download URL: odyn-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fecbd191117d25f543d5e3423d1afcfcdd7c71f469dcfab5ab1d1b627061b4c
MD5 c3499d9896b651b08df317cc75d333c9
BLAKE2b-256 8f240ec1a2501e111e0efb42ac8360bddb29d70b94de881306489a23dd29044a

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