cert-schema


Namecert-schema JSON
Version 3.7.2 PyPI version JSON
download
home_pagehttps://github.com/blockchain-certificates/cert-schema
SummaryBlockchain certificates JSON-LD context and JSON schemas
upload_time2024-10-22 15:42:16
maintainerNone
docs_urlNone
authorinfo@blockcerts.org
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements pyld jsonschema tox validators
Travis-CI
coveralls test coverage No coveralls.
            [![Build Status](https://travis-ci.org/blockchain-certificates/cert-schema.svg?branch=master)](https://travis-ci.org/blockchain-certificates/cert-schema)
[![PyPI version](https://badge.fury.io/py/cert-schema.svg)](https://badge.fury.io/py/cert-schema)

# cert-schema

Blockchain Certificate schemas implement those of [Verifiable Credentials](https://www.w3.org/TR/vc-data-model/). As with Verifiable Credentials, we've provided both a JSON-LD context and JSON schema. The purpose of the JSON-LD context is to map types to Internationalized Resource Identifiers (IRIs), providing semantic context for data. The JSON Schema is used for syntactic validation.

This python package allows verification of a Blockchain Certificate against the JSON
schemas as a convenience. This is not the same as verifying the contents of a certificate against what is stored
on the blockchain. See the [cert-verifier-js](https://github.com/blockchain-certificates/cert-verifier-js) project.

*   [Blockcerts JSON Schema](docs/schema-3.0-alpha.md)

## Example

TODO update for V3 once cert-issuer issues one

The following is a Blockchain Certificate issued on the testnet Bitcoin network.

```json
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://www.blockcerts.org/schema/3.0-alpha/context.json",
    "https://www.w3.org/2018/credentials/examples/v1"
  ],
  "id": "urn:uuid:bbba8553-8ec1-445f-82c9-a57251dd731c",
  "type": [
    "VerifiableCredential"
  ],
  "issuer": "did:example:23adb1f712ebc6f1c276eba4dfa",
  "issuanceDate": "2010-01-01T19:73:24Z",
  "credentialSubject": {
    "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
    "alumniOf": {
      "id": "did:example:c276e12ec21ebfeb1f712ebc6f1"
    }
  },
  "signature": {
    "type": "MerkleProof2019",
    "created": "2020-01-21T12:32:11.693759",
    "proofValue": "z2LuLBVSfnVzaQtvzuA7EaPQsGEgYWeaMTH1p3uqAG3ESx9HYyFzFFrYsyPkZSbn1Ji5LN76jw6HBr3oiaa8KsQenCPqKk7dJvxEXsDnYvhuDHtsrSRbzHdJKd66jAowkzPxPFi3ivyAv7WRK1WV2VhegYVQEnCBTrGJWFUMFFXunTcus7ZyedQvS4sr61X2y8QuJ57ycB5JMEHvUgAVq3qh2g3ucehg2ERKLo98jmqTcsh9HThkECG3BTNYRD3QL7AHWPjxRbQNSA83QNYXcCNA7NaZnCWyjC17ZBj3xszp76XvqFRrLjQbRSbzjVTPtBSV8QjhxThT3KTfgwjRn5JeeXhYvebsTT9YGL3W4ufzFRDpH79n5KPiaj1BPbEUfUq7vf2dg26QWeZBi7ME56",
    "proofPurpose": "assertionMethod",
    "verificationMethod": "ecdsa-koblitz-pubkey:0x7e30a37763e6Ba1fFeDE1750bBeFB4c60b17a1B3"
  }
}
```

## Publishing package to pypi

- [First time info](https://web.archive.org/web/20180501071551/http://peterdowns.com/posts/first-time-with-pypi.html)
- Publish script: `./release_package.sh`


## 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
    ```


## Compile markdown from schema

Note that json-schema-to-markdown doesn't handle ref schemas well, so you will 
need to manually update any 'undefined' references.

`scripts/generate_markdown.js` builds the markdown-formatted schemas from json

## Contact

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


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/blockchain-certificates/cert-schema",
    "name": "cert-schema",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "info@blockcerts.org",
    "author_email": "info@blockcerts.org",
    "download_url": "https://files.pythonhosted.org/packages/75/b1/e537684df3352287749c952721b28463c139243addbd3ed5c346417c5411/cert-schema-3.7.2.tar.gz",
    "platform": null,
    "description": "[![Build Status](https://travis-ci.org/blockchain-certificates/cert-schema.svg?branch=master)](https://travis-ci.org/blockchain-certificates/cert-schema)\n[![PyPI version](https://badge.fury.io/py/cert-schema.svg)](https://badge.fury.io/py/cert-schema)\n\n# cert-schema\n\nBlockchain Certificate schemas implement those of [Verifiable Credentials](https://www.w3.org/TR/vc-data-model/). As with Verifiable Credentials, we've provided both a JSON-LD context and JSON schema. The purpose of the JSON-LD context is to map types to Internationalized Resource Identifiers (IRIs), providing semantic context for data. The JSON Schema is used for syntactic validation.\n\nThis python package allows verification of a Blockchain Certificate against the JSON\nschemas as a convenience. This is not the same as verifying the contents of a certificate against what is stored\non the blockchain. See the [cert-verifier-js](https://github.com/blockchain-certificates/cert-verifier-js) project.\n\n*   [Blockcerts JSON Schema](docs/schema-3.0-alpha.md)\n\n## Example\n\nTODO update for V3 once cert-issuer issues one\n\nThe following is a Blockchain Certificate issued on the testnet Bitcoin network.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://www.blockcerts.org/schema/3.0-alpha/context.json\",\n    \"https://www.w3.org/2018/credentials/examples/v1\"\n  ],\n  \"id\": \"urn:uuid:bbba8553-8ec1-445f-82c9-a57251dd731c\",\n  \"type\": [\n    \"VerifiableCredential\"\n  ],\n  \"issuer\": \"did:example:23adb1f712ebc6f1c276eba4dfa\",\n  \"issuanceDate\": \"2010-01-01T19:73:24Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:ebfeb1f712ebc6f1c276e12ec21\",\n    \"alumniOf\": {\n      \"id\": \"did:example:c276e12ec21ebfeb1f712ebc6f1\"\n    }\n  },\n  \"signature\": {\n    \"type\": \"MerkleProof2019\",\n    \"created\": \"2020-01-21T12:32:11.693759\",\n    \"proofValue\": \"z2LuLBVSfnVzaQtvzuA7EaPQsGEgYWeaMTH1p3uqAG3ESx9HYyFzFFrYsyPkZSbn1Ji5LN76jw6HBr3oiaa8KsQenCPqKk7dJvxEXsDnYvhuDHtsrSRbzHdJKd66jAowkzPxPFi3ivyAv7WRK1WV2VhegYVQEnCBTrGJWFUMFFXunTcus7ZyedQvS4sr61X2y8QuJ57ycB5JMEHvUgAVq3qh2g3ucehg2ERKLo98jmqTcsh9HThkECG3BTNYRD3QL7AHWPjxRbQNSA83QNYXcCNA7NaZnCWyjC17ZBj3xszp76XvqFRrLjQbRSbzjVTPtBSV8QjhxThT3KTfgwjRn5JeeXhYvebsTT9YGL3W4ufzFRDpH79n5KPiaj1BPbEUfUq7vf2dg26QWeZBi7ME56\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"verificationMethod\": \"ecdsa-koblitz-pubkey:0x7e30a37763e6Ba1fFeDE1750bBeFB4c60b17a1B3\"\n  }\n}\n```\n\n## Publishing package to pypi\n\n- [First time info](https://web.archive.org/web/20180501071551/http://peterdowns.com/posts/first-time-with-pypi.html)\n- Publish script: `./release_package.sh`\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\n## Compile markdown from schema\n\nNote that json-schema-to-markdown doesn't handle ref schemas well, so you will \nneed to manually update any 'undefined' references.\n\n`scripts/generate_markdown.js` builds the markdown-formatted schemas from json\n\n## Contact\n\nContact us at [the Blockcerts community forum](http://community.blockcerts.org/).\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Blockchain certificates JSON-LD context and JSON schemas",
    "version": "3.7.2",
    "project_urls": {
        "Homepage": "https://github.com/blockchain-certificates/cert-schema"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef8c23b82ab143f65775350b1f49cff5fd82badc4f4f7300d704be5574e1d267",
                "md5": "22b6690b5dfb39919d474550c5fb436e",
                "sha256": "c44bdaaf14c713a50c6e26aca3b101dcb04cd55feb871c70dc1b5419a1635ea3"
            },
            "downloads": -1,
            "filename": "cert_schema-3.7.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "22b6690b5dfb39919d474550c5fb436e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 85352,
            "upload_time": "2024-10-22T15:42:15",
            "upload_time_iso_8601": "2024-10-22T15:42:15.736133Z",
            "url": "https://files.pythonhosted.org/packages/ef/8c/23b82ab143f65775350b1f49cff5fd82badc4f4f7300d704be5574e1d267/cert_schema-3.7.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "75b1e537684df3352287749c952721b28463c139243addbd3ed5c346417c5411",
                "md5": "2a07762137d610b9bb771c634ea59667",
                "sha256": "db8acba68f33512380069b26d77bf395f9becf3cad734c0881cfcb5069895203"
            },
            "downloads": -1,
            "filename": "cert-schema-3.7.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2a07762137d610b9bb771c634ea59667",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 56773,
            "upload_time": "2024-10-22T15:42:16",
            "upload_time_iso_8601": "2024-10-22T15:42:16.959114Z",
            "url": "https://files.pythonhosted.org/packages/75/b1/e537684df3352287749c952721b28463c139243addbd3ed5c346417c5411/cert-schema-3.7.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-22 15:42:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "blockchain-certificates",
    "github_project": "cert-schema",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pyld",
            "specs": [
                [
                    ">=",
                    "2.0.3"
                ]
            ]
        },
        {
            "name": "jsonschema",
            "specs": [
                [
                    ">=",
                    "2.6.0"
                ]
            ]
        },
        {
            "name": "tox",
            "specs": [
                [
                    ">=",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "validators",
            "specs": [
                [
                    ">=",
                    "0.12.1"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "cert-schema"
}
        
Elapsed time: 0.35768s