Skip to main content

Python library for Vault8 service

Project description

Vault8 Python lib

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


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.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

vault8-0.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file vault8-0.0.1.tar.gz.

File metadata

  • Download URL: vault8-0.0.1.tar.gz
  • Upload date:
  • Size: 2.7 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

Hashes for vault8-0.0.1.tar.gz
Algorithm Hash digest
SHA256 061b2170ebb1c6e157c367d367797435c843077b360a136994fe071d1e9de955
MD5 3e4fb240c86d66e823b1f2a530ff418f
BLAKE2b-256 a33fbfa7ceb4004916e86dd008ba58643d8a7cdccf2220efad6ce2319b8c3106

See more details on using hashes here.

File details

Details for the file vault8-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: vault8-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 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

Hashes for vault8-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4dacd4c289f36314edafe18164ca5ddc446ece706f3b710deaf2cffb08d1ded3
MD5 5e680bca8fe67dd23ef7a82855c55003
BLAKE2b-256 beb9ab640a5ad8aac735d5b1a04623c0e41ff4fb3ef96990aacc5fd6e4c38a6c

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