Python client library and CLI tool for the Demo API of FilePreviews.io
Project description
Python client library and CLI tool for the FilePreviews.io service. Generate image previews and metadata from almost any kind of file.
Installation
Using pip:
$ pip install filepreviews
Using easy_install:
$ easy_install filepreviews
Usage
>>> fp = FilePreviews(api_key='API_KEY_HERE', api_secret='API_SECRET_HERE')
>>> fp.generate('http://www.getblimp.com/images/screenshot1.png')
<PreviewResult at 4497022216> JSON: {
"id": "220214ec-17ec-4f37-a790-eaea64522bf2",
"original_file": null,
"preview": null,
"status": "pending",
"thumbnails": null,
"url": "https://api.filepreviews.io/v2/previews/220214ec-17ec-4f37-a790-eaea64522bf2/",
"user_data": null
}
CLI
$ filepreviews \ --api_key=API_KEY_HERE \ --api_secret=API_SECRET_HERE \ generate http://www.getblimp.com/images/screenshot1.png { "id": "e48c645d-8c02-40ab-9f11-2b3f2316be15", "original_file": null, "preview": null, "status": "pending", "thumbnails": null, "url": "https://api.filepreviews.io/v2/previews/e48c645d-8c02-40ab-9f11-2b3f2316be15/", "user_data": null }
$ filepreviews \ --api_key=API_KEY_HERE \ --api_secret=API_SECRET_HERE \ retrieve e48c645d-8c02-40ab-9f11-2b3f2316be15 { "id": "e48c645d-8c02-40ab-9f11-2b3f2316be15", "original_file": null, "preview": null, "status": "pending", "thumbnails": null, "url": "https://api.filepreviews.io/v2/previews/e48c645d-8c02-40ab-9f11-2b3f2316be15/", "user_data": null }
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
filepreviews-2.0.1.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for filepreviews-2.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e46bb82e8622feefb3b80f8b768915aed696143eb7b86cb10f40673116859475 |
|
MD5 | b1282c7134c7762e02d323d5cc4d31a5 |
|
BLAKE2b-256 | 5246d97809527651a213b69150f7b4344e8dda143139dd7dd118bc6fc8d8bdba |