Pyuploadcare-wtforms
Installation
$ pip install pyuploadcare-wtforms
Usage
Package provides several fields for WTForms which made integration with Uploadcare little more easily:
FileWidget
FileField
ImageField - you can set manual cropping for uploaded images
FileGroupField
In common case for usage you need:
Use one of these fields in your form like this:
# your_app/forms.py
from wtforms import Form
from pyuploadcare_wtforms import ImageField
class YourSuperForm(Form):
image = ImageField(manual_crop='200x200')
...
Set up keys:
# your_project_config.py
from pyuploadcare import conf
conf.pub_key = 'demopublickey'
conf.secret = 'demoprivatekey'
Put script to your templates:
<script src="https://ucarecdn.com/widget/2.5.5/uploadcare/uploadcare.full.min.js" charset="utf-8"></script>
Look at that simplest example for getting quick start. You can easily install it locally by:
$ make run_example
Contributing
Fork the pyuploadcare-wtforms repo on GitHub.
Clone your fork locally:
$ git clone git@github.com:your_name_here/pyuploadcare-wtforms.git
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:
$ mkvirtualenv pyuploadcare-wtforms
$ cd pyuploadcare-wtforms/
$ python setup.py develop
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you’re done making changes, check that your changes pass the tests, including testing other Python versions with tox:
$ pip install tox
$ tox
Commit your changes and push your branch to GitHub:
$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
Metadata
Release files for pyuploadcare-wtforms 0.5
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 | |
|---|---|---|---|---|
| pyuploadcare-wtforms-0.5.tar.gz | 3.4 kB | Without provenance | Details |
Release files / pyuploadcare-wtforms-0.5.tar.gz
| Download URL | pyuploadcare-wtforms-0.5.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fcff4dad056e2f86d92ba4fc50276b554c6f635306fda9368777abbadcae84aa
|
|
BLAKE2b-256 checksum How to use checksums |
8c268c19a982807498f0154b08efcff386dfe262b893459f5edb2085e2afb98f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyuploadcare-wtforms 0.5
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.