This release is a pre-release and may not be stable for production use.
dune-aws
Basic AWS Components for syncing off-chain data with Dune Community Sources
Installation & Usage
pip install dune-aws
Usage Option 1; Direct via AWSClient
This option provides the end user with many facets of functionality (delete, upload, download, view files).
One can mix and match the required components for their use case (utilizing also aws.last_sync_block).
For a very simple example utilizing this, see Option 2.
import os
from dune_aws.aws import AWSClient
aws_client = AWSClient(
internal_role=os.environ["AWS_INTERNAL_ROLE"],
# Info below is provided by Dune team.
external_role=os.environ["AWS_EXTERNAL_ROLE"],
external_id=os.environ["AWS_EXTERNAL_ID"],
bucket=os.environ["AWS_BUCKET"],
)
data_set = [{"x": 1, "y": 2}, {"z": 3}]
aws_client.put_object(
data_set,
object_key="table_name/must_contain_dot_json_then_number.json",
)
Usage Option 2; Simpler via RecordHandler
from dune_aws.record_handler import RecordHandler
handler = RecordHandler(
file="table_name/moo_123",
data_set=[{"x": 1, "y": 2}, {"z": 3}] # should be list[dict[str, Any]],
# If AWSClient is not supplied to the handler, it will be loaded from environment.
)
handler.upload_content(delete_first=True)
Note that, one must first coordinate with Dune to
- gain access to the AWS bucket (i.e. external credentials) and
- define the table schema of your dataset.
Metadata
Release files for dune-aws 0.0.0b0
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 | |
|---|---|---|---|---|
| dune_aws-0.0.0b0.tar.gz | 10.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dune_aws-0.0.0b0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.4 kB
Release files / dune_aws-0.0.0b0.tar.gz
| Download URL | dune_aws-0.0.0b0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9302364cb97fe115e2656c5eca1d47b96a7a984ace884f7f8f646573f7247b97
|
|
BLAKE2b-256 checksum How to use checksums |
71ed4fae7563a2a8ec904945285d186606d3149faa35e9e210591da2106fc9dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Release files / dune_aws-0.0.0b0-py3-none-any.whl
| Download URL | dune_aws-0.0.0b0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
525d820181d863f793f704d9bdf6a5475467b5ad07d8a241244bc41a02d079c0
|
|
BLAKE2b-256 checksum How to use checksums |
d1ca1edf552a917fe6299e3aa7ff03fe1ec8163ceff888c288873d5dd3db8a1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Security for dune-aws 0.0.0b0
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.