assetman-0.0.4
توضیحات
Generic blob-data asset manager that provides an API, CLI interface, for managing S3 assets and the respective CloudFront delivery setup.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | assetman-0.0.4 |
| نام | assetman |
| نسخه کتابخانه | 0.0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Peter M. Elias |
| ایمیل نویسنده | petermelias@gmail.com |
| آدرس صفحه اصلی | http://github.com/petermelias/assetman |
| آدرس اینترنتی | https://pypi.org/project/assetman/ |
| مجوز | BSD |
# Assetman
[](https://pypi.python.org/pypi/assetman/)
[](https://travis-ci.org/petermelias/assetman)
[](https://pypi.python.org/pypi/assetman)
[](https://pypi.python.org/pypi/assetman/)
[](https://coveralls.io/r/petermelias/assetman?branch=master)
[](https://pypi.python.org/pypi/assetman/)
## Usage
```python
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 ```
نحوه نصب
نصب پکیج whl assetman-0.0.4:
pip install assetman-0.0.4.whl
نصب پکیج tar.gz assetman-0.0.4:
pip install assetman-0.0.4.tar.gz