pccontext


Namepccontext JSON
Version 0.2.4 PyPI version JSON
download
home_pagehttps://github.com/Python-Cardano/pycardano
SummaryChain Contexts for PyCardano library
upload_time2024-11-27 03:44:13
maintainerNone
docs_urlNone
authorHareem Adderley
requires_python<4.0.0,>=3.8.1
licenseMIT
keywords python cardano blockchain crypto
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ## PyCardano Chain Contexts

This library contains the various Chain Contexts to use with the PyCardano library.

### Basic Usage

#### Blockfrost

```python
from pccontext import BlockFrostChainContext
from blockfrost import ApiUrls

chain_context = BlockFrostChainContext(
    project_id="your_project_id",
    base_url=ApiUrls.mainnet.value
)

```

#### Cardano-CLI

```python
from pccontext import CardanoCliChainContext, CardanoCliNetwork
from pathlib import Path

chain_context = CardanoCliChainContext(
            binary=Path("cardano-cli"),
            socket=Path("node.socket"),
            config_file=Path("config.json"),
            network=CardanoCliNetwork.MAINNET,
)

```

#### Koios

```python
from pccontext import KoiosChainContext

chain_context = KoiosChainContext(api_key="api_key")

```

#### Ogmios

```python
from pccontext import OgmiosChainContext

chain_context = OgmiosChainContext(host="localhost", port=1337)

```

#### Kupo

```python
from pccontext import OgmiosChainContext, KupoChainContextExtension

ogmios_chain_context = OgmiosChainContext(host="localhost", port=1337)
chain_context = KupoChainContextExtension(wrapped_backend=ogmios_chain_context)

```

#### Offline Transfer File

```python
from pathlib import Path
from pccontext import OfflineTransferFileContext

chain_context = OfflineTransferFileContext(offline_transfer_file=Path("offline-transfer.json"))

```

#### Yaci Devkit

```python
from pccontext import YaciDevkitChainContext

chain_context = YaciDevkitChainContext(api_url="http://localhost:8080")

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Python-Cardano/pycardano",
    "name": "pccontext",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": "python, cardano, blockchain, crypto",
    "author": "Hareem Adderley",
    "author_email": "haddderley@kingpinapps.com",
    "download_url": "https://files.pythonhosted.org/packages/e8/f0/0d64493bc86bf6ed6ab61a943ace7345f57fb3d23521549f146b506e4ef5/pccontext-0.2.4.tar.gz",
    "platform": null,
    "description": "## PyCardano Chain Contexts\n\nThis library contains the various Chain Contexts to use with the PyCardano library.\n\n### Basic Usage\n\n#### Blockfrost\n\n```python\nfrom pccontext import BlockFrostChainContext\nfrom blockfrost import ApiUrls\n\nchain_context = BlockFrostChainContext(\n    project_id=\"your_project_id\",\n    base_url=ApiUrls.mainnet.value\n)\n\n```\n\n#### Cardano-CLI\n\n```python\nfrom pccontext import CardanoCliChainContext, CardanoCliNetwork\nfrom pathlib import Path\n\nchain_context = CardanoCliChainContext(\n            binary=Path(\"cardano-cli\"),\n            socket=Path(\"node.socket\"),\n            config_file=Path(\"config.json\"),\n            network=CardanoCliNetwork.MAINNET,\n)\n\n```\n\n#### Koios\n\n```python\nfrom pccontext import KoiosChainContext\n\nchain_context = KoiosChainContext(api_key=\"api_key\")\n\n```\n\n#### Ogmios\n\n```python\nfrom pccontext import OgmiosChainContext\n\nchain_context = OgmiosChainContext(host=\"localhost\", port=1337)\n\n```\n\n#### Kupo\n\n```python\nfrom pccontext import OgmiosChainContext, KupoChainContextExtension\n\nogmios_chain_context = OgmiosChainContext(host=\"localhost\", port=1337)\nchain_context = KupoChainContextExtension(wrapped_backend=ogmios_chain_context)\n\n```\n\n#### Offline Transfer File\n\n```python\nfrom pathlib import Path\nfrom pccontext import OfflineTransferFileContext\n\nchain_context = OfflineTransferFileContext(offline_transfer_file=Path(\"offline-transfer.json\"))\n\n```\n\n#### Yaci Devkit\n\n```python\nfrom pccontext import YaciDevkitChainContext\n\nchain_context = YaciDevkitChainContext(api_url=\"http://localhost:8080\")\n\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Chain Contexts for PyCardano library",
    "version": "0.2.4",
    "project_urls": {
        "Documentation": "https://pycardano.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/Python-Cardano/pycardano",
        "Repository": "https://github.com/KINGH242/pccontext.git"
    },
    "split_keywords": [
        "python",
        " cardano",
        " blockchain",
        " crypto"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7bc2be833a0584d6fb061d02c602642f05b567d1257d67c9a92a0bdf53532f92",
                "md5": "b8158236488bb5704822b4443a2db864",
                "sha256": "63acd67f5a734b2643739d4f5c7cd96d94178b426fbde9b87f126be945da4286"
            },
            "downloads": -1,
            "filename": "pccontext-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b8158236488bb5704822b4443a2db864",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 44798,
            "upload_time": "2024-11-27T03:44:11",
            "upload_time_iso_8601": "2024-11-27T03:44:11.775038Z",
            "url": "https://files.pythonhosted.org/packages/7b/c2/be833a0584d6fb061d02c602642f05b567d1257d67c9a92a0bdf53532f92/pccontext-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e8f00d64493bc86bf6ed6ab61a943ace7345f57fb3d23521549f146b506e4ef5",
                "md5": "f39d7c7b752fcd9fbcccb63c2d2ea4ff",
                "sha256": "bb9e6c65204bbef15ac75278629a87d27e21d5ce114114d210da2f087f80aeab"
            },
            "downloads": -1,
            "filename": "pccontext-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "f39d7c7b752fcd9fbcccb63c2d2ea4ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 32395,
            "upload_time": "2024-11-27T03:44:13",
            "upload_time_iso_8601": "2024-11-27T03:44:13.527655Z",
            "url": "https://files.pythonhosted.org/packages/e8/f0/0d64493bc86bf6ed6ab61a943ace7345f57fb3d23521549f146b506e4ef5/pccontext-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-27 03:44:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Python-Cardano",
    "github_project": "pycardano",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "pccontext"
}
        
Elapsed time: 0.37734s