[![Build Status](https://travis-ci.org/blockchain-certificates/cert-core.svg?branch=master)](https://travis-ci.org/blockchain-certificates/cert-core)
[![PyPI version](https://badge.fury.io/py/cert-core.svg)](https://badge.fury.io/py/cert-core)
# cert-core
This python library contains common Blockcerts models and accessors used by other Blockcerts python libraries.
Subpackages:
## cert-model
Parses different versions of Blockcerts JSON files into a common Certificate model.
## cert-store
Blockchain certificate storage. This is used as a library in the cert-viewer project.
The certificate storage interface is [simplekv](https://pypi.python.org/pypi/simplekv/). The default configurations
use the FilesystemStore, which is highly recommended if you are getting started. This makes it easier to issue,
copy, and view your Blockchain Certificates.
## Certificate Storage Configuration
The certificate storage location can be modified with the following configuration entries in your `conf.ini` file:
- `cert_store_type`: which key-value backing store to use. Current supported values are:
- `simplekv_fs`: (Default) file system store
- `simplekv_gridfs`: (Advanced) gridfs store
- `cert_store_path`: file system path if using `simplekv_fs`
- `mongodb_uri`: mongo db uri (including db name) if using `simplekv_gridfs`
Example File System config:
```
cert_store_type = simplekv_fs
cert_store_path = ./cert_data
```
Example GridFS config (Advanced):
```
cert_store_type = simplekv_gridfs
mongodb_uri = mongodb://localhost:27017/test
```
### Legacy options
**Warning**
Most users should ignore these instructions, which are only included as a temporary bridge for earlier users of blockcerts. We recommend migrating to the latest version of Blockcerts.
### V1 Aware Certificate Store
Warning: avoid this option unless you are sure you need it. Earlier versions of the Blockchain Certificate
required a separate storage of the certificate transaction id. That was managed in a `certificates` mongo db table.
The `--v1_aware` flag allows support for these certificates.
## Running the python code locally
1. Ensure you have an python environment. [Recommendations](https://github.com/blockchain-certificates/cert-issuer/blob/master/docs/virtualenv.md)
2. Git clone the repository and change to the directory
```bash
git clone https://github.com/blockchain-certificates/cert-core.git && cd cert-core
```
3. Run cert-core setup
```bash
pip install .
```
## Unit tests
This project uses tox to validate against several python environments.
1. Ensure you have an python environment. [Recommendations](https://github.com/blockchain-certificates/cert-issuer/blob/master/docs/virtualenv.md)
2. Run tests
```
./run_tests.sh
```
## Publishing package to pypi
- [First time info](http://peterdowns.com/posts/first-time-with-pypi.html)
- Publish script: `./release_package.sh`
## Contact
Contact us at [the Blockcerts community forum](http://community.blockcerts.org/).
Raw data
{
"_id": null,
"home_page": "https://github.com/blockchain-certificates/cert-core",
"name": "cert-core",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "info@blockcerts.org",
"author_email": "info@blockcerts.org",
"download_url": "https://files.pythonhosted.org/packages/a3/e6/72cc14978c21e850670821e1a86c0ae082af9ff2e83e1bac420d24002b89/cert-core-3.0.0.tar.gz",
"platform": null,
"description": "[![Build Status](https://travis-ci.org/blockchain-certificates/cert-core.svg?branch=master)](https://travis-ci.org/blockchain-certificates/cert-core)\n[![PyPI version](https://badge.fury.io/py/cert-core.svg)](https://badge.fury.io/py/cert-core)\n\n# cert-core\nThis python library contains common Blockcerts models and accessors used by other Blockcerts python libraries.\n\nSubpackages:\n\n## cert-model\n\nParses different versions of Blockcerts JSON files into a common Certificate model.\n\n## cert-store\n\nBlockchain certificate storage. This is used as a library in the cert-viewer project.\n\nThe certificate storage interface is [simplekv](https://pypi.python.org/pypi/simplekv/). The default configurations \nuse the FilesystemStore, which is highly recommended if you are getting started. This makes it easier to issue,\ncopy, and view your Blockchain Certificates.\n\n## Certificate Storage Configuration\n\nThe certificate storage location can be modified with the following configuration entries in your `conf.ini` file:\n\n- `cert_store_type`: which key-value backing store to use. Current supported values are:\n - `simplekv_fs`: (Default) file system store\n - `simplekv_gridfs`: (Advanced) gridfs store\n- `cert_store_path`: file system path if using `simplekv_fs`\n- `mongodb_uri`: mongo db uri (including db name) if using `simplekv_gridfs`\n\n\nExample File System config:\n\n```\ncert_store_type = simplekv_fs\ncert_store_path = ./cert_data\n```\n\nExample GridFS config (Advanced):\n\n```\ncert_store_type = simplekv_gridfs\nmongodb_uri = mongodb://localhost:27017/test\n```\n\n\n### Legacy options\n\n**Warning**\n\nMost users should ignore these instructions, which are only included as a temporary bridge for earlier users of blockcerts. We recommend migrating to the latest version of Blockcerts. \n\n### V1 Aware Certificate Store\n\nWarning: avoid this option unless you are sure you need it. Earlier versions of the Blockchain Certificate\nrequired a separate storage of the certificate transaction id. That was managed in a `certificates` mongo db table.\n\nThe `--v1_aware` flag allows support for these certificates.\n\n\n## Running the python code locally\n\n1. Ensure you have an python environment. [Recommendations](https://github.com/blockchain-certificates/cert-issuer/blob/master/docs/virtualenv.md)\n\n2. Git clone the repository and change to the directory\n\n ```bash\n git clone https://github.com/blockchain-certificates/cert-core.git && cd cert-core\n ```\n\n3. Run cert-core setup\n\n ```bash\n pip install .\n ```\n\n## Unit tests\n\nThis project uses tox to validate against several python environments.\n\n1. Ensure you have an python environment. [Recommendations](https://github.com/blockchain-certificates/cert-issuer/blob/master/docs/virtualenv.md)\n\n2. Run tests\n ```\n ./run_tests.sh\n ```\n\n## Publishing package to pypi\n\n- [First time info](http://peterdowns.com/posts/first-time-with-pypi.html)\n- Publish script: `./release_package.sh`\n\n## Contact\n\nContact us at [the Blockcerts community forum](http://community.blockcerts.org/).\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Blockcerts core models for python",
"version": "3.0.0",
"project_urls": {
"Homepage": "https://github.com/blockchain-certificates/cert-core"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aeaa94d75004a1420bca6cf5e0d5b702a769add58fb0457abf87c1e974000cfe",
"md5": "6a43b3c76b116da979ea67f94bdda5f9",
"sha256": "6cbea47e33a1f0aae4637dba002d897a281e4a7c2e4d593427745a00fc8a5280"
},
"downloads": -1,
"filename": "cert_core-3.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6a43b3c76b116da979ea67f94bdda5f9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 15489,
"upload_time": "2022-07-12T18:01:07",
"upload_time_iso_8601": "2022-07-12T18:01:07.164524Z",
"url": "https://files.pythonhosted.org/packages/ae/aa/94d75004a1420bca6cf5e0d5b702a769add58fb0457abf87c1e974000cfe/cert_core-3.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a3e672cc14978c21e850670821e1a86c0ae082af9ff2e83e1bac420d24002b89",
"md5": "01b99eab75180a1c21c3ae3c7ee07747",
"sha256": "f6c37e18e24eec5f39fe482c0c0643e42da2c121648387fb197da0e312df0008"
},
"downloads": -1,
"filename": "cert-core-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "01b99eab75180a1c21c3ae3c7ee07747",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14492,
"upload_time": "2022-07-12T18:01:09",
"upload_time_iso_8601": "2022-07-12T18:01:09.459951Z",
"url": "https://files.pythonhosted.org/packages/a3/e6/72cc14978c21e850670821e1a86c0ae082af9ff2e83e1bac420d24002b89/cert-core-3.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-07-12 18:01:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "blockchain-certificates",
"github_project": "cert-core",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "requests",
"specs": [
[
">=",
"2.18.4"
]
]
},
{
"name": "cert-schema",
"specs": [
[
">=",
"2.1.5"
]
]
},
{
"name": "configargparse",
"specs": [
[
">=",
"0.12.0"
]
]
},
{
"name": "connexion",
"specs": [
[
">=",
"1.1.14"
]
]
},
{
"name": "enum34",
"specs": [
[
">=",
"1.1.6"
]
]
},
{
"name": "Flask-PyMongo",
"specs": [
[
">=",
"0.5.1"
]
]
},
{
"name": "jsonschema",
"specs": [
[
">=",
"2.6.0"
]
]
},
{
"name": "python-dateutil",
"specs": [
[
">=",
"2.6.1"
]
]
},
{
"name": "pytz",
"specs": [
[
">=",
"2017.2"
]
]
},
{
"name": "simplekv",
"specs": [
[
">=",
"0.10.0"
]
]
},
{
"name": "tox",
"specs": [
[
">=",
"3.0.0"
]
]
},
{
"name": "validators",
"specs": [
[
">=",
"0.12.1"
]
]
}
],
"tox": true,
"lcname": "cert-core"
}