An internal package to allow for easy uploading of labels to the Ward Analytics API.
Project description
Ward Analytics Labels Upload Utility
This utility is used to upload labels to the Ward Analytics Database.
It is for internal use only.
Installation
pip install ward-labels-upload
Usage
Label Upload
from ward_labels_upload import Label, LabelUploader
uploader = LabelUploader(api_key="your_api_key")
# Note that all addresses are normalized to lowercase. This is necessary for blockchains suck as Ethereum.
labels = [
Label(address="0x12ef3", label="label1", description="description1"),
Label(address="0x45af6", label="label2", description="description2"),
Label(address="0x78cs9", label="label3", description="description3"),
]
uploader.upload_labels(labels=labels)
The LabelUploader class also takes an optional base_url parameter. This is the base URL of the Ward Analytics API. It defaults to https://api.wardanalytics.net, which is the production API.
Label Deletion
from ward_labels_upload import Label, LabelUploader
uploader = LabelUploader(api_key="your_api_key")
# Note that all addresses are normalized to lowercase. This is necessary for blockchains suck as Ethereum.
labels = [
Label(address="0x12ef3", label="label1"),
Label(address="0x45af6", label="label2"),
Label(address="0x78cs9", label="label3"),
]
uploader.delete_labels(labels=labels)
In the case of deletion, the description field is unnecessary. This happens because a label is uniquely identified by the combination of its address and label.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ward-labels-upload-0.0.5.tar.gz.
File metadata
- Download URL: ward-labels-upload-0.0.5.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67161ce5124ea1956d93e0fed4674700955911fdfeb301f15d81c199b2755870
|
|
| MD5 |
93f5b9025d076ec031fd6a05c8c088a1
|
|
| BLAKE2b-256 |
e3e7c3be6f64c5745c20f5b613a731d8da1f945eeb9a78c84c2c76d4ceb9627a
|
File details
Details for the file ward_labels_upload-0.0.5-py3-none-any.whl.
File metadata
- Download URL: ward_labels_upload-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be42655f9fa69e5bbc8b5e94075b6c80525575a839a7d277f66e9ffa4a365368
|
|
| MD5 |
0a90f516a7dc6a238c40fe2623dcfc21
|
|
| BLAKE2b-256 |
c0f633b79d434495dd2192822b841bf260572ffab6136d3f48eb51b79b9e4b39
|