Python library for Vault8 service
Project description
Vault8 Python lib
Installation
pip3 install vault8
Example
import os
import sys
import vault8
pubkey = os.getenv('VAULT8_PUBLIC_KEY', '')
privkey = os.getenv('VAULT8_SECRET_KEY', '')
url = os.getenv('VAULT8_URL', 'https://vault8.io')
vault = vault8.Vault8(public_key=pubkey, secret_key=privkey, service_url=url)
# upload file from localhost
image = open('pypi.png', 'rb')
# or remote
# image = 'https://example.com/pypi.png'
uploaded = vault.upload_image(image)
if uploaded.get('status') == 'error':
print(uploaded.get('response'))
sys.exit(0)
uid = uploaded.get('image_uid')
print(vault.image_url(uid=uid, filters=[('resize_fill',1000,500), ('grayscale',)]))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vault8-0.0.2.tar.gz
(2.8 kB
view details)
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 vault8-0.0.2.tar.gz.
File metadata
- Download URL: vault8-0.0.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a33e140887b39dd5a6a81bc8b91d09796bf99ea1eccb413880535eecde5b785
|
|
| MD5 |
ac50a4690f8a3089ab57437db21a2ada
|
|
| BLAKE2b-256 |
fb9f80bda164ad8085d69bd7a0d055f8d5095a6b0d51c3f7e7ed69b660349779
|
File details
Details for the file vault8-0.0.2-py3-none-any.whl.
File metadata
- Download URL: vault8-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2801196c0426ae1019f0e9a6520b805224d78aad913000933883c06944e0fa0
|
|
| MD5 |
cf5bd42c1390dd7bedf2ae81ee333a09
|
|
| BLAKE2b-256 |
b115d868cbdf735684bdf83c46a3e42cbc73d9e49d6a0e12e23a4ab585b9f175
|