Note to readers: On December 1, 2020, the Libra Association was renamed to Diem Association. The project repos are in the process of being migrated. All projects will remain available for use here until the migration to a new GitHub Organization is complete.
The official Diem Client SDK for Python.
Modules Overview
SPEC = specification
DIP-X = Diem Improvement Protocol
Root module name: diem
Sub-modules:
jsonrpc: diem JSON-RPC APIs client and API response types. SPECstdlib: generated code, move stdlib script utils for constructing transaction script playload.diem_types: generated code, Diem on-chain data structure types for encoding and decoding LCS data.utils: utility functions, account address utils, currency code, hashing, hex encoding / decoding, transaction utils.AuthKey|auth_key: auth key utilsidentifier: Diem Account Identifier and Diem Intent Identifier. DIP-5txnmetadata: utils for creating peer to peer transaction metadata. DIP-4testnet: Testnet utility, minting coins, create Testnet client, chain id, Testnet JSON-RPC URL.LocalAccount|local_account: utility for managing local account keys, generate random local account.chain_ids: list of static chain ids
Examples
>>> from diem import jsonrpc, testnet
>>> client = jsonrpc.Client(testnet.JSON_RPC_URL)
>>> client.get_metadata()
version: 3300304
timestamp: 1601492912847973
chain_id: 2
You can find more examples under the examples directory:
Note: make test runs all examples too, see the Makefile for details.
Download
pip install diem-client-sdk
Bugs/Requests
Please use the GitHub issue tracker to submit bugs or request features.
Build & Test
make init
make test
run specific test:
TEST=<test file / test name> make test
Metadata
Release files for diem 0.6.2020120202
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 |
|---|---|---|---|---|
| diem-0.6.2020120202.tar.gz | 66.7 kB | Without provenance | Details for diem-0.6.2020120202.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diem-0.6.2020120202-py3-none-any.whl | Python 3 | none | any | Details for diem-0.6.2020120202-py3-none-any.whl |
Total release size: 142.6 kB
Release files / diem-0.6.2020120202.tar.gz
| Download URL | diem-0.6.2020120202.tar.gz |
|---|---|
| Size | 66.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e773e264b103ce2bc323c5d6215772becd86e947ff836cc956d8b62c57124667
|
|
BLAKE2b-256 checksum How to use checksums |
28d248e4d0d582ad27d52e9685f5bf8f7cfaa8e4c35977a40d7d44054a6e8f78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.20.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
|
Release files / diem-0.6.2020120202-py3-none-any.whl
| Download URL | diem-0.6.2020120202-py3-none-any.whl |
|---|---|
| Size | 76.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7281c95d4b3f2eb114da8e89f8be39c8a9c78d9cfea9414f500be1fd3232dcc4
|
|
BLAKE2b-256 checksum How to use checksums |
d64ff372abdb09663386a9d00595929e0d4718d63346ed68b675d3b325bea457
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.20.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
|
Security for diem 0.6.2020120202
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.