Metadata-Version: 2.4
Name: python-1c-odata
Version: 0.1.2
Summary: Библиотека для работы с 1С через OData
Home-page: https://github.com/itsuppartem/python-1c-odata
Author: Artem Guliaev
Author-email: itsuppartem@yandex.ri
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.8.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# python-1c-odata

A library for working with 1C through the OData protocol. Supports asynchronous operations with documents, catalogs, and registers.

## Installation

```bash
pip install python-1c-odata
```

## Key Features

- Asynchronous document operations (create, read, post)
- Catalog operations (create, read, update)
- Information and accumulation registers support
- Filtering, selection, and data expansion support

## Usage Examples

```python
import asyncio
from python_1c_odata.core import Infobase
from python_1c_odata.document import Document
from python_1c_odata.catalog import Catalog
from python_1c_odata.informationregister import InformationRegister

async def main():
    # Connect to 1C
    infobase = Infobase(
        server="http://your-server",
        infobase="your-infobase",
        username="your-username",
        password="your-password"
    )

    # Work with documents
    doc = Document(infobase, "Document")
    docs = await doc.query(
        top=10,
        select="Ref_Key,Number,Date",
        odata_filter="Date ge datetime'2024-01-01T00:00:00'"
    )

    # Work with catalog
    catalog = Catalog(infobase, "Catalog")
    items = await catalog.query(
        top=100,
        select="Ref_Key,Description"
    )

    # Work with register
    register = InformationRegister(infobase, "Register")
    data = await register.slice_last(
        period="2024-03-20T00:00:00",
        select="Period,RecordKey,Value"
    )

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

## Requirements

- Python 3.7+
- aiohttp

## License

MIT
