Skip to main content

Python library for Uploadcare.com

Project description

PyUploadcare: a Python library for Uploadcare

Uploadcare Python & Django integrations handle uploads and further operations with files by wrapping Upload and REST APIs.

Simple file uploads for the web are of most importance for us. Today, everyone is used to the routine of allowing users to upload their pics or attach resumes. The routine covers it all: installing image processing libraries, adjusting permissions, ensuring servers never go down, and enabling CDN.

This library consists of the Uploadcare API interface and a couple of Django goodies.

Simple as that, Uploadcare ImageField can be added to an existing Django project in just a couple of simple steps. This will enable your users to see the upload progress, pick files from Google Drive or Instagram, and edit a form while files are being uploaded asynchronously.

You can find an example project here.

    from django import forms
    from django.db import models

    from pyuploadcare.dj.models import ImageField
    from pyuploadcare.dj.forms import FileWidget, ImageField as ImageFormField


    class Candidate(models.Model):
        photo = ImageField(blank=True, manual_crop="")


    # optional. provide advanced widget options: https://uploadcare.com/docs/uploads/widget/config/#options
    class CandidateForm(forms.Form):
        photo = ImageFormField(widget=FileWidget(attrs={
            'data-cdn-base': 'https://cdn.super-candidates.com',
            'data-image-shrink': '1024x1024',
        }))

Documentation

Detailed documentation is available on RTD.

Feedback

Issues and PRs are welcome. You can provide your feedback or drop us a support request at hello@uploadcare.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyuploadcare-4.2.2.tar.gz (240.3 kB view hashes)

Uploaded Source

Built Distribution

pyuploadcare-4.2.2-py3-none-any.whl (259.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page