Skip to main content

Chain Contexts for PyCardano library

Project description

PyCardano Chain Contexts

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

Basic Usage

Blockfrost

from pccontext import BlockFrostChainContext
from blockfrost import ApiUrls

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

Cardano-CLI

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

from pccontext import KoiosChainContext

chain_context = KoiosChainContext(api_key="api_key")

Ogmios

from pccontext import OgmiosChainContext

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

Kupo

from pccontext import OgmiosChainContext, KupoChainContextExtension

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

Offline Transfer File

from pathlib import Path
from pccontext import OfflineTransferFileContext

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

Yaci Devkit

from pccontext import YaciDevkitChainContext

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

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

pccontext-0.2.0.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

pccontext-0.2.0-py3-none-any.whl (43.2 kB view details)

Uploaded Python 3

File details

Details for the file pccontext-0.2.0.tar.gz.

File metadata

  • Download URL: pccontext-0.2.0.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.10.10 Darwin/24.0.0

File hashes

Hashes for pccontext-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d863cd019482975fa28872e5bd7805d759c6c01b5aef93fd6f3c003b425bc9b4
MD5 d9d085a4e99e219ee92d075f5eb65c65
BLAKE2b-256 2068b8b47e8deec2932d8e1f2a9489393e769d859386637df1c83a213d8d6795

See more details on using hashes here.

File details

Details for the file pccontext-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pccontext-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 43.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.10.10 Darwin/24.0.0

File hashes

Hashes for pccontext-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36d88a733ac7302cf633d13dee8d68eb8337796dd4033d51fb7e9f5f3cff160b
MD5 067685a2c5a2b8815455c312d540828e
BLAKE2b-256 596a4ffbc00adc524275dc34588784cff133ebdd1ce08a1106891b16a81bb0eb

See more details on using hashes here.

Supported by

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