Common code for Pantos off-chain components
1. Introduction
1.1 Overview
Welcome to the documentation for Pantos Common. This repository is a centralized hub for storing shared code components used across multiple projects within our organization.
The primary purpose of the Common Repository is to promote code reusability, streamline collaboration, and maintain consistency across various projects. Centralizing shared code aims to enhance efficiency and reduce redundancy in our development processes.
1.2 Features
The Pantos Common project currently offers the following functionalities:
Signing module
The signer.py module is used for signing and verifying signatures. The private key must be on the curve Ed25519 or Ed448 and encrypted in a PEM file.
Service nodes module
The servicenodes.py module is used for communicating with Pantos service nodes. It can be used for querying the bids, sending transfers, and requesting the transfer status.
Blockchain utility modules
The blockchain utility modules extract common blockchain functionalities used across projects. Such functionalities include sending transactions or calling the blockchain nodes for read-only data.
The blockchain utility modules can be found in the blockchains package. There is a Python module for each Pantos-supported blockchain.
2. Installation
2.1 Prerequisites
Please make sure that your environment meets the following requirements:
Python Version
Pantos Common supports Python 3.13 or higher. Ensure that you have the correct Python version installed before the installation steps. You can download the latest version of Python from the official Python website.
Library Versions
The Pantos Common project has been tested with the library versions specified in poetry.lock.
Poetry
Poetry is our tool of choice for dependency management and packaging.
Installing: https://python-poetry.org/docs/#installing-with-the-official-installer or https://python-poetry.org/docs/#installing-with-pipx
By default poetry creates the venv directory under under {cache-dir}/virtualenvs. If you opt for creating the virtualenv inside the project’s root directory, execute the following command:
poetry config virtualenvs.in-project true
2.2 Installation Steps
From Pypi
$ pip install pantos-common
From source code
Create the virtual environment and install the dependencies:
$ poetry install --no-root
3. Usage
The Pantos Common project should be used as a utility library, for example as a submodule in an upstream project. After those steps, the modules can be imported directly from the Common library.
3.1 Configuration
The Pantos Common library allows its configuration to be loaded from multiple predefined folders. This normally involves an environment file and a base YAML configuration file, which can be located in the following predefined paths:
$PWD
$HOME
~/.config
/etc/pantos
/etc
Each service defines a default file name under which this file is searched. The service then expects the environment file to be present in the same location with the same name but with a different .env extension.
Alternatively one can define the location of such files by using the PANTOS_CONFIG and PANTOS_ENV_FILE environment variables.
3.2 Examples
https://github.com/pantos-io/client-library/blob/main/pantos/client/library/blockchains/base.py
Metadata
Release files for pantos-common 6.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pantos_common-6.0.1.tar.gz | 67.5 kB | With provenance | Details for pantos_common-6.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pantos_common-6.0.1-py3-none-any.whl | Python 3 | none | any | Details for pantos_common-6.0.1-py3-none-any.whl |
Total release size: 176.8 kB
Release files / pantos_common-6.0.1.tar.gz
| Download URL | pantos_common-6.0.1.tar.gz |
|---|---|
| Size | 67.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d906fd80886b1273fb38ebbd3e5f2fc61f51f602f7b9f523582a4e6252801110
|
|
BLAKE2b-256 checksum How to use checksums |
6aaeef9b1a410b6cd4c4c2f969c63ec311a22f0eb3b550c0db4fc4fca4a63f44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 7, 2025.
Transparency logRelease files / pantos_common-6.0.1-py3-none-any.whl
| Download URL | pantos_common-6.0.1-py3-none-any.whl |
|---|---|
| Size | 109.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
195c8d0ccc82515328b5b2ae04554a05eac549dd28a8d82437d077c9deeefc2b
|
|
BLAKE2b-256 checksum How to use checksums |
0fa98ba72f28d124b670b7b68f05ce85c09b8dead56ebf92c4b68a01b5328f9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 7, 2025.
Transparency logSecurity for pantos-common 6.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pantos_common-6.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 7, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.