Skip to main content

Библиотека для работы с 1С через OData

Project description

python-1c-odata

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

Installation

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

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

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

python_1c_odata-0.1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

python_1c_odata-0.1.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file python_1c_odata-0.1.2.tar.gz.

File metadata

  • Download URL: python_1c_odata-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for python_1c_odata-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d1905d965b997eb7ed71a452a1671bbcd59195ba8ea492f52b2c9e40da00db66
MD5 9b656ff70cce67cc002b066ac34cd118
BLAKE2b-256 8a5b841085571e774e078598f70e30ef110ee9345e1c44e253a8c9b842a1f658

See more details on using hashes here.

File details

Details for the file python_1c_odata-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_1c_odata-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b0d8d9d0ae6bd83452592a3ebf4a6a4ecbe7877d1729e718f05412150329c12f
MD5 c0e624689dc078b06009259cc9692f08
BLAKE2b-256 7e42c2322fb218e27f13df4610cd3d40189e9778e3b2f0930b80909ff1bdd010

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