(Unofficial) Arches ORM [EXPERIMENTAL]
This provides simple (server-side) access to Arches resources from Python as Python objects. It makes no guarantees about efficiency or type-accuracy but such issues raised will be addressed as far as possible.
Installation
Basic installation can then happen as follows, without Arches backend support:
pip install .
To run tests, make sure you have libsqlite3-mod-spatialite, or your distribution's equivalent
package for enabling Spatialite in Python. Instead of using a real Arches PostgreSQL database, we spin
a fresh test database up in memory.
WARNING: The mock DB behaviour for Python testing is not identical to a real Arches database, but is adequately close for now, is fast and has no server dependency.
There are several sets of optional dependencies.
GraphQL
Turns Arches ORM into an API server for Arches.
pip install .[graphql]
Arches
Allows Arches ORM to directly manipulate the Arches database.
pip install .[arches]
Test
Runs tests across the various backends.
pip install .[tests]
Well-known Resource Models
To provide a partial boundary, this package expects a settings object called
WELL_KNOWN_RESOURCE_MODELS to list, at least, the models that should be
wrapped by this system.
It should be a list:
WELL_KNOWN_RESOURCE_MODELS = [
{
"model_name": "Person",
"graphid": "4110f743-1a44-11e9-9a37-000d3ab1e500",
"nodes": {}, # optional additional configuration
"to_string": lambda wkrm: str(wkrm) # optional callback for stringifying
}
]
You must not take this list as an exclusive boundary of data that can be accessed.
Hooks
This package also contains experimental functionality for hooking tile saves,
so that client code can use the MyModel.post_save signal to get well-known
resource model events. To avoid any unintended overhead, it does not load
unless explicitly turned on with arches_orm.add_hooks().
Tests
Note that the tests require spatialite and so a Python that allows Sqlite3
extension loading:
PYTHON_CONFIGURE_OPTS="--enable-loadable-sqlite-extensions" pyenv install 3.10.10
Documentation
Documentation is available on https://flaxandteal.github.io/arches-orm/.
Thanks
Particular thanks to the funders of this work, and to the Arches community for their work on which this builds. Particular thanks to Historic England's team for the underlying resource models used in the test-cases.
Metadata
Release files for arches-orm 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arches_orm-0.4.2.tar.gz | 1.4 MB | With provenance | Details for arches_orm-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arches_orm-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for arches_orm-0.4.2-py3-none-any.whl |
Total release size: 1.6 MB
Release files / arches_orm-0.4.2.tar.gz
| Download URL | arches_orm-0.4.2.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f7bea7e72eb8e2b697ccbf5935300d81e54ada0bc0a169b1e050868696f00d8
|
|
BLAKE2b-256 checksum How to use checksums |
2a95e450a4dcf064b01e6443b657ee9d2b12e512e4e82ee7f2ecddd5c7c536ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2025.
Transparency logRelease files / arches_orm-0.4.2-py3-none-any.whl
| Download URL | arches_orm-0.4.2-py3-none-any.whl |
|---|---|
| Size | 141.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f18aa8aa96f526fb8acd6cc690ae4da2cbcd22c01d2f7fb28580e2020d47356f
|
|
BLAKE2b-256 checksum How to use checksums |
bc0d72d458b8964cd2a1d86b15529fea419926c2ddbbae2517bcaee24445ebfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2025.
Transparency logSecurity for arches-orm 0.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for arches_orm-0.4.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.