Skip to main content

Akamai's NetStorage API communication kit

Project description

https://img.shields.io/pypi/status/NetStorageKit.svg?style=flat-square

Usage

The tests describe the usage thoroughly, but consider this upload example.

import netstoragekit as ns

# NetStorage connection information
# The host part is prepended to -nsu.akamaihd.net, i.e. mycdn-nsu.akamaihd.net
test = dict(key_name='abc', key='abcdefghijk1234'
            cpcode='12345', host='mycdn')

# Create a Request instance
request = ns.api.Request(test['key_name'], test['key'],
                         test['cpcode'], test['host'])

remote_path = 'media/images/products/123.jpg'
local_path = '/opt/data/products/123.jpg'

# Upload the local path to the remote one (always relative to the CPCode)
# The returned data is the XML returned by the API parsed as a python object
# The response is the object as returned by the requests package
data, response = request.upload(remote_path, local_path)

Installation

Development

pip install autoenv
pip install virtualenv
virtualenv -p /usr/bin/python2.7.9 env
source env/bin/activate
python setup.py install
# Run tests
py.test tests.py

Production

pip install netstoragekit

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

NetStorageKit-1.0.8.tar.gz (13.4 kB view details)

Uploaded Source

Built Distributions

NetStorageKit-1.0.8-py2.7.egg (19.8 kB view details)

Uploaded Egg

NetStorageKit-1.0.8-py2-none-any.whl (11.5 kB view details)

Uploaded Python 2

File details

Details for the file NetStorageKit-1.0.8.tar.gz.

File metadata

  • Download URL: NetStorageKit-1.0.8.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for NetStorageKit-1.0.8.tar.gz
Algorithm Hash digest
SHA256 77ca18325e8c80acb9c044b1a8bb9417b3bbbff7988e7597d983ce12aba1cbb6
MD5 ab08e00aef806c5da4d430fa809419bf
BLAKE2b-256 18200a30e3d89a45f6772f49393b69a8b63a36d43ceabc01208591aa6d1c6a7e

See more details on using hashes here.

File details

Details for the file NetStorageKit-1.0.8-py2.7.egg.

File metadata

File hashes

Hashes for NetStorageKit-1.0.8-py2.7.egg
Algorithm Hash digest
SHA256 1ab964793808733d7d77bc771db1cb66926c190cf69aaa7ee459833776ff9505
MD5 e0c7d8a98e734f216b75d437ea13d122
BLAKE2b-256 1433fc6de2fa6e8ab32e0fd0db91f2c25ae8e3e2bd5d455dae8f34490b7ee158

See more details on using hashes here.

File details

Details for the file NetStorageKit-1.0.8-py2-none-any.whl.

File metadata

File hashes

Hashes for NetStorageKit-1.0.8-py2-none-any.whl
Algorithm Hash digest
SHA256 466e756e1b927fe51306c3f70f9c30bf2170e6e8316eebe0685d4e5ebe90e321
MD5 dae726b40eed2efe7cb67cec0c54de50
BLAKE2b-256 61cbfaf4566939da09f9990ab61d79f711c5679c9ae082951bd9d31fcc0edb02

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page