cardanopythonlib


Namecardanopythonlib JSON
Version 1.2 PyPI version JSON
download
home_pagehttps://github.com/larestrepo/CardanoPythonLib
SummaryCardano Python lib to interact with the blockchain
upload_time2023-09-08 17:02:39
maintainer
docs_urlNone
authorMoxie
requires_python>=3.9,<4.0
licenseApache-2.0
keywords cardano blockchain python backend
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CardanoPythonLib

### Cardano Python Library

This is a Python library to interact with Cardano Blockchain. 

<hr>

- Prerequesites

    Minimum: Cardano-cli. You will be able to run offchain code, generate keys, create and sign transactions.
    
    Desired: Cardano-node running. You will be able to submit onchain and get confirmations from the blockchain.


### Install poetry

```shell
curl -sSL https://install.python-poetry.org | python3 -

poetry new <project_name>
```
### Add dependencies
```shell
poetry add cardanopythonlib
```

The library relies on a cardano_config.ini file which connects to Cardano testnet by default. If you want to overwrite some of the parameters, please create a new ini file in your folder:

    [node]
    KEYS_FILE_PATH = ./.priv/wallets
    SCRIPTS_FILE_PATH = ./.priv/scripts
    TRANSACTION_PATH_FILE = ./.priv/transactions
    CARDANO_NETWORK = testnet
    CARDANO_ERA = babbage-era
    CARDANO_NETWORK_MAGIC = 2
    CARDANO_CLI_PATH = cardano-cli
    URL = http://localhost:8090/v2/wallets/
    [logger]
    LEVEL=INFO

When using CARDANO_NETOWRK = mainnet the CARDANO_NETWORK_MAGIC is ignored. 

Instantiate the class as follows:

```python
from cardanopythonlib import base

config_path = './cardano_config.ini' # Optional argument
node = base.Node(config_path) # Or with the default ini: node = base.Node()
node.query_tip_exec()
```

#

### Working with the library

cardanopythonlib folder is the package that contains the main functionalities. 

base.py file contains 3 classes.

- Starter
- Node
- Keys

For usage please go to docs folder.

### Credits:

Latest implementations related to Plutus are based on the following repo:

[pycardano](https://github.com/Python-Cardano/pycardano)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/larestrepo/CardanoPythonLib",
    "name": "cardanopythonlib",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "cardano,blockchain,python,backend",
    "author": "Moxie",
    "author_email": "luis.restrepo@ayllu.io",
    "download_url": "https://files.pythonhosted.org/packages/74/f7/eed4a7780baf55975bea109b22a6b8174d495a9fb11da2668e17157aac3f/cardanopythonlib-1.2.tar.gz",
    "platform": null,
    "description": "# CardanoPythonLib\n\n### Cardano Python Library\n\nThis is a Python library to interact with Cardano Blockchain. \n\n<hr>\n\n- Prerequesites\n\n    Minimum: Cardano-cli. You will be able to run offchain code, generate keys, create and sign transactions.\n    \n    Desired: Cardano-node running. You will be able to submit onchain and get confirmations from the blockchain.\n\n\n### Install poetry\n\n```shell\ncurl -sSL https://install.python-poetry.org | python3 -\n\npoetry new <project_name>\n```\n### Add dependencies\n```shell\npoetry add cardanopythonlib\n```\n\nThe library relies on a cardano_config.ini file which connects to Cardano testnet by default. If you want to overwrite some of the parameters, please create a new ini file in your folder:\n\n    [node]\n    KEYS_FILE_PATH = ./.priv/wallets\n    SCRIPTS_FILE_PATH = ./.priv/scripts\n    TRANSACTION_PATH_FILE = ./.priv/transactions\n    CARDANO_NETWORK = testnet\n    CARDANO_ERA = babbage-era\n    CARDANO_NETWORK_MAGIC = 2\n    CARDANO_CLI_PATH = cardano-cli\n    URL = http://localhost:8090/v2/wallets/\n    [logger]\n    LEVEL=INFO\n\nWhen using CARDANO_NETOWRK = mainnet the CARDANO_NETWORK_MAGIC is ignored. \n\nInstantiate the class as follows:\n\n```python\nfrom cardanopythonlib import base\n\nconfig_path = './cardano_config.ini' # Optional argument\nnode = base.Node(config_path) # Or with the default ini: node = base.Node()\nnode.query_tip_exec()\n```\n\n#\n\n### Working with the library\n\ncardanopythonlib folder is the package that contains the main functionalities. \n\nbase.py file contains 3 classes.\n\n- Starter\n- Node\n- Keys\n\nFor usage please go to docs folder.\n\n### Credits:\n\nLatest implementations related to Plutus are based on the following repo:\n\n[pycardano](https://github.com/Python-Cardano/pycardano)\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Cardano Python lib to interact with the blockchain",
    "version": "1.2",
    "project_urls": {
        "Homepage": "https://github.com/larestrepo/CardanoPythonLib",
        "Repository": "https://github.com/larestrepo/CardanoPythonLib"
    },
    "split_keywords": [
        "cardano",
        "blockchain",
        "python",
        "backend"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "79fbd91e9d02cd7319a3d88ab80ca6affc304c157321dfac67d4198dfc359baa",
                "md5": "d2d30dc413106b8e70c6acc6d41461bc",
                "sha256": "17cd747bbe4f931162bf86aaf0c143070ef905801e321e830a0e9ba0fca622d5"
            },
            "downloads": -1,
            "filename": "cardanopythonlib-1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d2d30dc413106b8e70c6acc6d41461bc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 42922,
            "upload_time": "2023-09-08T17:02:37",
            "upload_time_iso_8601": "2023-09-08T17:02:37.947054Z",
            "url": "https://files.pythonhosted.org/packages/79/fb/d91e9d02cd7319a3d88ab80ca6affc304c157321dfac67d4198dfc359baa/cardanopythonlib-1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "74f7eed4a7780baf55975bea109b22a6b8174d495a9fb11da2668e17157aac3f",
                "md5": "d0f4af8cb8664c01a910b4b7ac68e81b",
                "sha256": "d47c9ba7266d2b7d8348ada070803169c7e26cd76c7b6730c97decb1aa8fbfca"
            },
            "downloads": -1,
            "filename": "cardanopythonlib-1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d0f4af8cb8664c01a910b4b7ac68e81b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 37195,
            "upload_time": "2023-09-08T17:02:39",
            "upload_time_iso_8601": "2023-09-08T17:02:39.036830Z",
            "url": "https://files.pythonhosted.org/packages/74/f7/eed4a7780baf55975bea109b22a6b8174d495a9fb11da2668e17157aac3f/cardanopythonlib-1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-08 17:02:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "larestrepo",
    "github_project": "CardanoPythonLib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cardanopythonlib"
}
        
Elapsed time: 0.15191s