Skip to main content

Assets Store

Github

This library was created to simplify the upload/download of files from/to S3, Azure Storage, or your desired server.

Setup instructions

The project is using python 3.12, it relies on boto3 lib for S3, azure-storage-blob for AzureStorage, and paramiko for server connections.

How to use

Install with pip depending on which type of storage do you use (s3,server,azure,minio are choices):

pip install AssetsStore[s3]

Set environment variables dependent on what upload you are using:

  • AzureStorage
ASSET_STORE=AzureFiles
ASSET_ACCESS_KEY="put_access_key"
ASSET_SECRET_ACCESS_KEY="put_access_key_secret"
ASSET_LOCATION="name_of_the_blob"
ASSET_PUBLIC_URL="blob_public_url"
LOCAL_STORE=path_to_download_folder
  • S3
ASSET_STORE=S3Files
ASSET_ACCESS_KEY="put_access_key"
ASSET_SECRET_ACCESS_KEY="put_access_key_secret"
ASSET_LOCATION="name_of_the_bucket"
ASSET_PUBLIC_URL="blob_public_url"
ASSET_REGION="s3_region"
LOCAL_STORE=path_to_download_folder
  • for local development
ASSET_STORE=LocalFiles
ASSET_LOCATION="path_to_folder"
ASSET_PUBLIC_URL="local_url_if_folder_hosted"
LOCAL_STORE=path_to_download_folder

The library has the ability to use Rebrand and to use it add these envs:

REBRAND_KEY="rebrand_key"
REBRAND_DOMAIN='rebrand_domain'

Usage example

from assetsstore.assets import FileAssets

assets = FileAssets.get_asset()  # setup asset store
assets.put_file("some_file.txt")  # Upload file from local download folder
assets.get_file("some_file.txt")  # Download file to local download folder
assets.del_local_file("some_file.txt")  # Delete file from local download folder
assets.del_file("some_file.txt")  # Deletes file from server

Authors

Deployment to PyPI

flit build
flit publish

Contributing

Contributions are always welcome! :)

Metadata

Release files for AssetsStore 1.8.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AssetsStore 1.8.8
File Size Uploaded
assetsstore-1.8.8.tar.gz 70.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for AssetsStore 1.8.8
File Interpreter ABI Platform
assetsstore-1.8.8-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 103.1 kB

Release files / assetsstore-1.8.8.tar.gz

Download URL assetsstore-1.8.8.tar.gz
Size 70.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3e992c81578705a5ded2c183f9aa33860cad6ed5465d515fe7abeee04ee85c11
BLAKE2b-256 checksum
How to use checksums
f3e5f4cafe1586a34f1ef7a12e041fe3cb5429d619327c1c47698237e59454f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.4

Release files / assetsstore-1.8.8-py2.py3-none-any.whl

Download URL assetsstore-1.8.8-py2.py3-none-any.whl
Size 32.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
00e670e5c7c81015f4e39bc22851511d61b16fa9a81cb4aac695d353f7a0747f
BLAKE2b-256 checksum
How to use checksums
216ee328b3cc8aea68bb6aadf6c0061b91f3b1f94385333edbb70605c12aa170
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.4

Release history Release notifications | RSS feed

This release

1.8.8 This release

2 release files

1.8.7

2 release files

1.8.6

2 release files

1.8.5

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.2

1 release file

1.7.1

1 release file

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page