Chaintrail API Wrapper
Installation
pip3 install chaintrailapi
Import and use the package as demonstrated in example.py below:
from chaintrailapi import ChainTrail, Accounts, Dataset
import matplotlib.pyplot as plt
api = ChainTrail("localhost:3000", Dataset.JAN_2019)
account_data = api.get_accounts(['acct_address'])
account_scaled = api.get_accounts(['tx_count','avg_tx_in','avg_tx_out','std_tx_in','std_tx_out']).get_scaled()
print(account_scaled.shape)
pcadata = ChainTrail.calculate_pca(account_scaled, components=2)
inliers, outliers, xx, yy, z_train = ChainTrail.predict_outliers(pcadata)
# plot the training points
plt.contour(xx,yy,z_train, levels=[0], linewidths=2, colors='darkred')
plt.scatter(pcadata[inliers,0], pcadata[inliers,1], color='blue', alpha=0.2)
plt.scatter(pcadata[outliers,0], pcadata[outliers,1], color='red', alpha=0.4)
plt.show()
Metadata
Release files for chaintrailapi 0.0.6
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 | |
|---|---|---|---|---|
| chaintrailapi-0.0.6.tar.gz | 2.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chaintrailapi-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / chaintrailapi-0.0.6.tar.gz
| Download URL | chaintrailapi-0.0.6.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be638ed728a1407430f2f757f2b4b7bf748a3a8758ffd96c690a5950c5544004
|
|
BLAKE2b-256 checksum How to use checksums |
4aae6fce4ecce2928d8572fa0f011f24612be9402acb49435740855830200466
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Release files / chaintrailapi-0.0.6-py3-none-any.whl
| Download URL | chaintrailapi-0.0.6-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f301e8d7aa0a1be1f8b84ec770e91d445acbc7c738a38ecdf97a8e4a3503e223
|
|
BLAKE2b-256 checksum How to use checksums |
cd52c54a7bb180552ba578ca8211b79c0db29f49b1db44dc8b191fe688dcf437
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Security for chaintrailapi 0.0.6
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.