This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A Python SDK for the Storj API.

Installation

pip install storj

Usage

Create a user account

import storj
storj.register_new_user(
    email='someone@email.com',
    password='a better password than this'
)
# Check email for confirmation link

Generate a key pair and start using it for authentication

import storj
(private_key, public_key) = storj.generate_new_key_pair()
storj.authenticate(
    email='someone@email.com',
    password='a better password than this'
)
storj.public_keys.add(public_key)
storj.authenticate(ecdsa_private_key=private_key)

Manage your public keys

import storj

# Get all registered public keys
key_list = storj.public_keys.all()

# Add a key
storj.public_keys.add(public_key)

# Remove one key
storj.public_keys.remove(public_key)

# Remove all keys
storj.public_keys.clear()

Manage your buckets

import storj

# Get all buckets
bucket_list = storj.buckets.all()

# Get a single bucket
existing_bucket = storj.buckets.get(id='56ef0d4656bf7b950faace7a')

# Create a new bucket
new_bucket = storj.buckets.create(name='my first bucket')
another_bucket = storj.buckets.create(
    name='another bucket', storage_limit=300, transfer_limit=100
)

# Delete a bucket
new_bucket.delete()

# Delete a bucket without fetching it
storj.buckets.delete(bucket_id='56ef0d4656bf7b950faace7a')

Get file metadata for files in a bucket

existing_bucket.files.all()

Create a PUSH or PULL token for a bucket

push_token = existing_bucket.tokens.create(operation='PUSH')

Upload a file

# Use a file path string
new_bucket.files.upload('/path/to/file.txt')

# Or a file handle
with open('/path/to/another/file.png') as file:
    another_bucket.files.upload(file)

Download a file

files = existing_bucket.files.all()
txt_file = files[0]
txt_file_contents = txt_file.download()

Delete a file

existing_file.delete()

Manage a bucket’s public keys

# Get all registered public keys
key_list = existing_bucket.authorized_public_keys.all()

# Add a key
existing_bucket.authorized_public_keys.add(public_key)

# Remove a key
existing_bucket.authorized_public_keys.remove(public_key)

# Remove all keys
existing_bucket.authorized_public_keys.clear()

Use your own Storj API service

import storj
storj.api_client.base_url = 'https://myserver.org'
Release History

Release History

0.1.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
storj-0.1.6.tar.gz (28.4 kB) Copy SHA256 Checksum SHA256 Source Nov 29, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting