Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
The coolest little asset manager ever written for S3 / CloudFront.
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
assetman
.coveragerc
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
MANIFEST.in
README.md
TODO.md
setup.cfg
setup.py

README.md

Assetman

Latest Version Build Status Montly Downloads Download format Coverage Status License

Usage

from assetman import (
    init, 
    create_blob
)

manager = init(aws_key, aws_secret, my_bucket)
some_data = 'my awsome string / image binary / html / markdown / national secrets'
asset = create_blob(some_data)
asset.public = True # makes the asset publicly accessible over S3
manager.save_asset(asset)

print asset.uuid # returns a 16 character UUID which you can save for later

# ... somewhere over the Mediterranean sea...

my_saved_asset = manager.get_asset(uuid)

print my_saved_asset.data
'my awsome string / image binary / html / markdown / national secrets'

It is also important to note that there are some convenience Asset Types built in for convenient handling of meta data and mimetypes.

For example, the Image asset type will track format and dimensions for you. See tests for example.

Testing

To install with testing support: pip install -e .[test] This will install with the optional dependencies required for testing. (wand, for example.) nosetests

Something went wrong with that request. Please try again.