Qualities and Quantities are the stuff of Objects.
Project description
Ontic
Welcome to Ontic, a package designed with making it easy to handle data objects. Ontic provides a pure data object representations that support object-style and dict-style attribute access. In addition, Ontic supports schema definition to aid in the validation and management of Ontic object instances.
By way of a quick preview:
from ontic.ontic_type import OnticType, create_ontic_type, validate_object
from ontic.schema_type import SchemaType
# Define the schema
schema = SchemaType(
prop1={'type':'str','required':True},
prop2={'type':'int','min':1})
# Define an ontic type
AType = create_ontic_type('AType', schema)
# Use AType to create a data instance
obj = AType()
# Show off object and dict style property access
obj.prop1 = 'Some Value'
obj['prop2'] = 3
# And the validation
validate_object(obj)
Documentation
For the latest documentation, visit http://neoinsanity.github.io/ontic/
Getting Ontic
Installation
Use pip to install ontic.
pip install ontic
Source
The latest stable release source of Ontic can be found on the master branch at https://github.com/neoinsanity/ontic/tree/master.
For the latest development code, use the develop branch at https://github.com/neoinsanity/ontic. Please note that the development branch may change without notification.
To install Ontic from source utilize the setup.py:
python setup.py install
Project Development
If you are interested in developing Ontic code, utilize the helper scripts in the ontic/bin directory.
Setup the Development Environment
Prior to running the dev setup scripts, ensure that you have virtualenv installed. All setup commands are assumed to be run from the project root, which is the directory containing the setup.py file.
Prep the development environment with the command:
bin/dev_setup.sh
This command will setup the virtualenv for the project in the directory /venv. It will also install the Ontic in a develop mode, with the creation of a development egg file.
Enable the Development Environment
To make it easy to ensure a correctly configured development session, utilize the command:
. bin/enable_dev.sh
or
source bin/enable_dev.sh
Note that the script must be sourced, as it will enable a virtualenv session and add the bin directory scripts to environment PATH.
Running Tests
To run the unit tests:
run_tests.sh
Building Documentation
To run the documentation generation:
doc_build.sh
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
Built Distribution
File details
Details for the file ontic-1.0.0.tar.gz
.
File metadata
- Download URL: ontic-1.0.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51b1f49bb934f9b3e635aec92521fd156c0faeb98ea4dc4fb7fc3b6eb04abaed |
|
MD5 | 0e644df955fd9298dbbdf13a27735d73 |
|
BLAKE2b-256 | 4ed97979c509be8a02fb8c971b4b3dba7a7a47b203fb272248f8de5b55e5e6d2 |
File details
Details for the file ontic-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: ontic-1.0.0-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3761de3d5fc9ae813cc15e78c8a3ca1c662860ff289e62eda45e5f9bc8b4741 |
|
MD5 | 08e6fe2134ae366879ffa56197e231e6 |
|
BLAKE2b-256 | c0022973ac4a9a6d1fec32160a4d614d5a03cdd3c0c3d0e7351d3947827710ca |