Skip to main content

Blockcerts core models for python

Project description

[![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 `

  1. 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

## Contact

Contact us at [the Blockcerts community forum](http://community.blockcerts.org/).

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

cert_core_bloxberg2-0.0.1.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cert_core_bloxberg2-0.0.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file cert_core_bloxberg2-0.0.1.tar.gz.

File metadata

  • Download URL: cert_core_bloxberg2-0.0.1.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for cert_core_bloxberg2-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7c6f7b6a46f5df35b4fce3e21f183f629fe9245e957ac1420331081c3234c063
MD5 1b2bbe36fa95195549df3684be0f37a4
BLAKE2b-256 eb5574ce880e582125d14e7bd617176195911a9bbdf6f6e725973471d87848c0

See more details on using hashes here.

File details

Details for the file cert_core_bloxberg2-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cert_core_bloxberg2-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a73ab0a5f30dec501cdb437aedac176afe28c2a8e0e7ee1a457fb9af4a4c7058
MD5 c4e0cd5052e3f3113eb4fd706295ece8
BLAKE2b-256 9889826ee82748116b83780540beba1c00b7c3e4bc5954de8c31b906c0799113

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page