Skip to main content

A lightweight dynamic ORM for OData services in Python

Project description

OData ORM Python

[!CAUTION] :warning: WORK IN PROGRESS - USE WITH CAUTION :warning:
This repository is under active development and currently not stable.

Overview

odataormpy is a Python3.x library created to easily access OData objects easily without writing any HTTP requests code.

Examples

from odataormpy import ORMSession, ORMObject, ORM

# Creating a new session with the OData backend
orm_session : ORMSession = ORMSession("api.odata.host.com", ("username", "password"))

# Creating the ORM object.
orm : ORM = ORM(orm_session)

# Registering the OData service
orm.register_service(
    service_name="c4codatapai",
    service_endpoint="/sap/c4c/odata/v1/c4codatapi"
)

print("Available Entities: ", orm.list_entities("c4codataapi"))

customer = orm.Customers.filter((RoleCode == "CRM000") & (Name == "John")).execute()

if customer:
    customer.Name = "Diego"
    customer.update()

orm.close()

Notes

  • Project was started as a way to easily manage OData calls specific to SAP Cloud For Customer(C4C). OData from other system may not work with this library. It's on my mind to allow users to use other systems. Although it shouldn't be an issue if OData implementation are equal across different systems.

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

odataormpy-0.1.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

odataormpy-0.1.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file odataormpy-0.1.1.tar.gz.

File metadata

  • Download URL: odataormpy-0.1.1.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for odataormpy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 236691f61ed7f0bda7c94278c91c753d3b3a8b4235d6b2f64bbb028988fcf34e
MD5 24c17847823b3a639ab3b1554dbd3498
BLAKE2b-256 c4d331f9a6383ce7ffa1b50c349802d92d4cb8c2716945c9add8fb178e6a8ccd

See more details on using hashes here.

File details

Details for the file odataormpy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: odataormpy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for odataormpy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c7823d4a223a4b2b5f924a70bfd6ef0ee30c3b036b8921583f003a6df791df3
MD5 92b1a6ebdf287274046e3715603ef0f9
BLAKE2b-256 bd0688585f863af9dc7b03ee6ab211d0120e99259fa4618933a9edd8b70dd3bf

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