Skip to main content

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

ward-labels-upload-0.0.4.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ward_labels_upload-0.0.4-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file ward-labels-upload-0.0.4.tar.gz.

File metadata

  • Download URL: ward-labels-upload-0.0.4.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for ward-labels-upload-0.0.4.tar.gz
Algorithm Hash digest
SHA256 9c24ecde9c39e55fbb44e28a59c374354541f005f5ff172029d6b01df884d7a6
MD5 6adc5085ee04e7f00cae280a59e70bea
BLAKE2b-256 eb7e3df6337b5c0ddcfd62724b18b9531f15cf36b0c2788bfd5f62f9852b1008

See more details on using hashes here.

File details

Details for the file ward_labels_upload-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ward_labels_upload-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 89108d75db4c20d401868ece5db993a3e93f54488aefbf26569c1d4ca71b5b72
MD5 7d4c6334dc188f7c0037f7c1caa3758d
BLAKE2b-256 c4f1daeabbc4f61433cd6b3f9c69a52b42d936bdb393353b3500dee1cd9a692e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page