Moonstream Entity Python Client
In order to use this client, you will need a Moonstream access token. You can generate one at https://moonstream.to/account/tokens.
The client library reads this token from the MOONSTREAM_ACCESS_TOKEN environment variable. To set it:
export MOONSTREAM_ACCESS_TOKEN="<your_access_token>"
Collections
Create collection:
entity --token "$MOONSTREAM_ACCESS_TOKEN" collections create --name "My Ethereum addresses"
List collections:
entity --token "$MOONSTREAM_ACCESS_TOKEN" collections list
Delete collection:
export ENTITY_COLLECTION_ID="<your_collection_id>"
entity --token "$MOONSTREAM_ACCESS_TOKEN" collections delete --collection_id "$ENTITY_COLLECTION_ID"
Entities
export ENTITY_COLLECTION_ID="<your_collection_id>"
Create entity:
entity --token "$MOONSTREAM_ACCESS_TOKEN" entities create --collection_id "$ENTITY_COLLECTION_ID" --address "0x000000000000000000000000000000000000dEaD" --blockchain ethereum --name "Dead address" --required_field '{"dead": true}' --required_field '{"owner": "unknown"}' --secondary_field '{"description": "Dangerous address for tokens burning mechanism."}'
Create entity bulk from csv:
Input file addresses.csv contains list of addresses:
address,name
0xe1991fFb1f2271Bc645293cCDf4e38a3f1b7a13c,Address 1
0x37309157eC7863b04c66B6fB2bf7b21EE8B03bA1,Address 2
entity --token "$MOONSTREAM_ACCESS_TOKEN" entities bulk --blockchain ethereum --collection_id "$ENTITY_COLLECTION_ID" --input addresses.csv --required_field '{"owner": "me"}' --secondary_field '{"description": "My bot address"}'
List entities in collection:
entity --token "$MOONSTREAM_ACCESS_TOKEN" entities list --collection_id "$ENTITY_COLLECTION_ID"
Delete entity:
export ENTITY_ID="<your_entity_id>"
entity --token "$MOONSTREAM_ACCESS_TOKEN" entities delete --collection_id "$ENTITY_COLLECTION_ID" --entity_id "$ENTITY_ID"
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 moonstream-entity-0.0.1.tar.gz.
File metadata
- Download URL: moonstream-entity-0.0.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
266422cf2840d7da92c8a9a51a739a35c03d4315fc7ec3c78a1b3875e1aa5964
|
|
| MD5 |
df3b4f543f6fa9f507a5a24f01dfa73e
|
|
| BLAKE2b-256 |
878551978229f2ee623aa712881635c92f300e26f3f8af0305d5224a4bc69ffb
|
File details
Details for the file moonstream_entity-0.0.1-py3-none-any.whl.
File metadata
- Download URL: moonstream_entity-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8e9d73959b36d9efab3f6fd16bad41e943a5a2227d16d7df43c6a701e10d64b
|
|
| MD5 |
36c7d2062129b4455f370688731c4e34
|
|
| BLAKE2b-256 |
376cd19f758ef144521c813faacec8cc37222ce6fc492841c3fdb709c88ab831
|