comdexpy
The comdexpy is a comprehensive Python library designed to provide developers with easy access to the Comdex blockchain and its ecosystem. This library enables developers to interact with the blockchain, query data, and perform various operations within the Comdex ecosystem.
Installation
pip3 install comdexpy
Usage
Creating a connection
import asyncio
from comdexpy.client import Client
async def get_connection():
grpc_url = "comdex-grpc.lavenderfive.com"
return Client.from_endpoint(grpc_url, 443)
async def main():
connection = await get_connection()
connection.close()
if __name__ == "__main__":
asyncio.run(main())
Querying on comdex node using connection
import asyncio
from comdexpy.client import Client
from comdexpy.queries.comdex.liquidity import Query as LiquidityQueries
async def get_connection():
grpc_url = "comdex-grpc.lavenderfive.com"
return Client.from_endpoint(grpc_url, 443)
async def sample_query(channel):
liquidity = LiquidityQueries(channel)
params = await liquidity.get_generic_params(1)
print(params.to_dict())
async def main():
connection = await get_connection()
await sample_query(connection.channel())
connection.close()
if __name__ == "__main__":
asyncio.run(main())
Sending transaction on comdex node
import asyncio
from comdexpy.client import Client
from comdexpy.wallet import Wallet
from comdexpy.messages.cosmos.bank import MsgSend
from comdexpy.proto.cosmos.base.v1beta1 import Coin
from comdexpy.send_tx import SignAndBroadcastMessage
async def get_connection():
grpc_url = "comdex-grpc.lavenderfive.com"
return Client.from_endpoint(grpc_url, 443)
async def sample_tx(connection):
wallet = Wallet.from_mnemonic("seeds here")
sender = wallet.get_address().to_acc_bech32()
msg_send = MsgSend(
from_address=sender,
to_address="comdex",
amount=[Coin(amount="1000000", denom="ucmdx")],
)
response = await SignAndBroadcastMessage.send_tx(connection, wallet, msg_send)
print(response)
async def main():
connection = await get_connection()
await sample_tx(connection)
connection.close()
if __name__ == "__main__":
asyncio.run(main())
Complete Usage
Documentation
You can read the documentation here.
Feedback
If you have any feedback, please reach out to us at https://forum.comdex.one/
License
This software is licensed under the GPL-3.0 license. See LICENSE for full disclosure.
Metadata
Release files for comdexpy 0.5
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 |
|---|---|---|---|---|
| comdexpy-0.5.tar.gz | 157.3 kB | Without provenance | Details for comdexpy-0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| comdexpy-0.5-py3-none-any.whl | Python 3 | none | any | Details for comdexpy-0.5-py3-none-any.whl |
Total release size: 360.9 kB
Release files / comdexpy-0.5.tar.gz
| Download URL | comdexpy-0.5.tar.gz |
|---|---|
| Size | 157.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af19b4b49e6864c4633ccd3cd5575bb1e32ec096baba5efb1832bb745aa2f73f
|
|
BLAKE2b-256 checksum How to use checksums |
74ad3fb588b2f2a2ca7104fdb4631432c465750ed17aaadc13594bcfe255452a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / comdexpy-0.5-py3-none-any.whl
| Download URL | comdexpy-0.5-py3-none-any.whl |
|---|---|
| Size | 203.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9248dffc7525a1ce2aca0ce7d1cad2a00f8baa375d98734a968729e3c3fb5b2
|
|
BLAKE2b-256 checksum How to use checksums |
aead0c20579ffa2a696fda1701bfd6cf4e8a360bd34e98d80a74e900c79f98c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for comdexpy 0.5
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.