Experimental Arches Object Relational Mapper
Project description
(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.
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 generated using pdocs but,
as the arches_django
subpackage expects a running Arches instance to be importable
(a side-effect of Django), we add an initialization routine.
python docs/make_doc.py
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file arches_orm-0.0.1.tar.gz
.
File metadata
- Download URL: arches_orm-0.0.1.tar.gz
- Upload date:
- Size: 143.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ece1e8d1fe82f39a6956dc416452f1795f7ac95136663d1525b73b4eb865024 |
|
MD5 | 142feae0a5f7d4641f0ccfe6afa6eac6 |
|
BLAKE2b-256 | f95f0d3bb38f7b0e6696e7e8d4926fa76817353c0afbfae122cc635c9a8913e7 |
File details
Details for the file arches_orm-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: arches_orm-0.0.1-py3-none-any.whl
- Upload date:
- Size: 77.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cb90e47c76ab64ed63ebd9c93de28d56babac290abefaa0c1d387d0ba905980 |
|
MD5 | 588f768090cf08783fddd5c5178c63f4 |
|
BLAKE2b-256 | a65a56959087f1e6af086498d2026f8643613f037cdedd82b11df7f97f24b807 |