Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

=======
api-orm
=======

Interact with API endpoints as Python objects and manage resources in an ORMy way

Installation
============

Python version supported: 3.6+

.. code-block::

pip install api-orm


About
=====

We have written many small clients to different APIs. It usually becomes a
couple of functions like:

.. code-block:: python

client.get_customers()
client.new_customer()
# etc

When writing our client for our accounting API we wanted a more declarative way
of accessing our data. Also the API supported OData which allows for filtering
on all parameters. This made request look more like database access than
simple REST endpoints. So we wanted an interface more like a database ORM.

We use django a lot so we would like something we are used to.

This library is an attempt to extract the ORM parts of our Visma client so that
we can reuse the framework for a bunch of other API clients.

We want an api very alike the Django ORM:

.. code-block:: python

all_customers = Customer.api.all()
a = Customer(**customer_data)
a.save()

some_customers = Customer.api.filter(name='Dave').exclude(invoice_postal_code__startswith='25')



Before we have to write alot of custom validation but in this framework we use
the awesome serializer library marshmallow to transform python objects to
HTTP-request data and back. This gives us a declarative way of defining our
models and it comes included with validation of schemas and fields.
There are also tools available to generate models from and API specification
which greatly reduces the implementation time.

=========
Changelog
=========

The format is based on `Keep a Changelog: https://keepachangelog.com/en/1.0.0/`,
and this project adheres to `Semantic Versioning: https://semver.org/spec/v2.0.0.html`

Unreleased
----------

Added
^^^^^

Changed
^^^^^^^

Deprecated
^^^^^^^^^^

Removed
^^^^^^^

Fixed
^^^^^

Security
^^^^^^^^


Metadata

Release files for api-orm 0.0.0.dev1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for api-orm 0.0.0.dev1
File Size Uploaded
api-orm-0.0.0.dev1.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for api-orm 0.0.0.dev1
File Interpreter ABI Platform
api_orm-0.0.0.dev1-py3-none-any.whl Python 3 none any Details

Total release size: 6.6 kB

Release files / api-orm-0.0.0.dev1.tar.gz

Download URL api-orm-0.0.0.dev1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6e93e75fb0622ff15d4e9db6c6b9185006ea59d96ffc93a81c99288e1e976c9d
BLAKE2b-256 checksum
How to use checksums
9cea358014486f9c6b1089282dd157d8f3969b5cbdf8724718b2d79fbfa3308f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4

Release files / api_orm-0.0.0.dev1-py3-none-any.whl

Download URL api_orm-0.0.0.dev1-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54e0e3215f94ea51495de496c94065f4a32263cd2087c59678571f345eec50ab
BLAKE2b-256 checksum
How to use checksums
3c3f7b24c360d176e1a01c83a3315b5f3c6b0cd61b330acc151c75ce56edbbc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4

Release history Release notifications | RSS feed

This release

0.0.0.dev1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page