netstorage
Netstorage is a simple client library for Akamai’s Netstorage API.
To get started, you’ll need the following from your account/luna portal.
Key name
Key
Hostname
Example Use
First you’ll need to create a Netstorage instance.
import netstorage
token_name, token, hostname = 'TOKENABC SECRET_TOKEN whalerock-nsu.akamai-hd.net'.split()
ns = netstorage(token_name, token, hostname)
Disk Usage
The root directory is usually a CP CODE.
disk_usage = ns.du('/39650')
print disk_usage.files
print disk_usage.size
List directory contents
Retrieve directory contents
directory_contents = ns.dir('/396500')
for item in directory_contents:
print '{item.name} | {item.path} | {item.size}'.format(item=item)
Deleting a file
ns.delete('/396500/important.txt')
Downloading a file
ns.download('/396500/very_important.txt', '/tmp/very_important.txt')
# You can also supply a directory
ns.download('/396500/very_important.txt', '/tmp/')
Supported actions
You’ll notice that the methods match Akamai’s API documentation. The methods that are currrently supported are:
delete
dir
download
du
mkdir
rename
upload
Development Guide
To run tests, install tox and run tox.
Integration tests
We use betamax to capture the http/https interactions. We filter out sensitive data such as hostname to the nestorage instance, as well as the KEY NAME used in the headers.
Metadata
Release files for netstorage 0.0.91
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| netstorage-0.0.91.tar.gz | 5.5 kB | Without provenance | Details |
Release files / netstorage-0.0.91.tar.gz
| Download URL | netstorage-0.0.91.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e51ed90dde6489745d84089221ba919e6d9b1399a0c18d0b88388ed86a2b69f
|
|
BLAKE2b-256 checksum How to use checksums |
fdbefe625024ac5c60c44aa4ca2845c75a9c362428527c79d3a846e692ed1bad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for netstorage 0.0.91
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.