### Install Dependencies Source: https://github.com/cloudinary/pycloudinary/blob/master/samples/spookyshots/README.md Install the required Python dependencies for the Spooky Pet Image App. ```bash pip install -r requirements.txt ``` -------------------------------- ### Configure Cloudinary Credentials Source: https://github.com/cloudinary/pycloudinary/blob/master/samples/spookyshots/README.md Set up your Cloudinary credentials by renaming the example environment file and filling in your API details. ```bash CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret ``` -------------------------------- ### Install Cloudinary Python SDK Source: https://github.com/cloudinary/pycloudinary/blob/master/README.md Use pip to install the Cloudinary Python SDK. This is the first step to integrating Cloudinary into your Python application. ```bash pip install cloudinary ``` -------------------------------- ### Run Full Test Suite with Tox Source: https://github.com/cloudinary/pycloudinary/blob/master/CONTRIBUTING.md Execute the complete test suite across multiple Python and Django versions using Tox. Requires Python 2.7, 3.4, 3.5, 3.6, 3.7 to be installed. ```bash CLOUDINARY_URL=cloudinary://apikey:apisecret@cloudname tox ``` -------------------------------- ### Clone Repository and Navigate Source: https://github.com/cloudinary/pycloudinary/blob/master/samples/spookyshots/README.md Clone the pycloudinary repository and navigate to the spookyshots sample directory. ```bash git clone https://github.com/cloudinary/pycloudinary.git cd pycloudinary/samples/spookyshots ``` -------------------------------- ### Run Basic Tests with CLOUDINARY_URL Source: https://github.com/cloudinary/pycloudinary/blob/master/CONTRIBUTING.md Execute the basic test suite by setting the CLOUDINARY_URL environment variable. ```bash CLOUDINARY_URL=cloudinary://apikey:apisecret@cloudname python setup.py test ``` -------------------------------- ### Clone and Set Up Upstream Repository Source: https://github.com/cloudinary/pycloudinary/blob/master/CONTRIBUTING.md Clone the pycloudinary repository and set up the upstream remote for future updates. ```bash git clone https://github.com/contributor/pycloudinary.git cd pycloudinary git remote add upstream https://github.com/cloudinary/pycloudinary.git ``` -------------------------------- ### Stage and Commit Changes Source: https://github.com/cloudinary/pycloudinary/blob/master/CONTRIBUTING.md Stage your changes and commit them. Consider squashing commits for a cleaner history. ```bash git add ... git commit ``` -------------------------------- ### Run the Streamlit App Source: https://github.com/cloudinary/pycloudinary/blob/master/samples/spookyshots/README.md Execute the main Python script to run the Spooky Pet Image App using Streamlit. ```bash streamlit run main.py ``` -------------------------------- ### Import Cloudinary Library Source: https://github.com/cloudinary/pycloudinary/blob/master/README.md Import the necessary Cloudinary library before using its functionalities. ```python import cloudinary ``` -------------------------------- ### Export CLOUDINARY_URL (zsh/bash/sh) Source: https://github.com/cloudinary/pycloudinary/blob/master/samples/basic/README.md Set the CLOUDINARY_URL environment variable for authentication. This is typically done in zsh, bash, or sh shells. ```shell export CLOUDINARY_URL=cloudinary://API-Key:API-Secret@Cloud-name ``` -------------------------------- ### Configure Git User Information Source: https://github.com/cloudinary/pycloudinary/blob/master/CONTRIBUTING.md Set your global Git user name and email address for commit tracking. ```bash git config --global user.name "Your Name" git config --global user.email "contributor@example.com" ``` -------------------------------- ### Run the Python Upload Script Source: https://github.com/cloudinary/pycloudinary/blob/master/samples/basic/README.md Execute the main Python script to perform file uploads using Cloudinary. ```python python basic.py ``` -------------------------------- ### Set CLOUDINARY_URL (Windows) Source: https://github.com/cloudinary/pycloudinary/blob/master/samples/basic/README.md Establish the CLOUDINARY_URL environment variable for authentication. Use this command in Windows command prompt or PowerShell. ```shell > set CLOUDINARY_URL=cloudinary://API-Key:API-Secret@Cloud-name ``` -------------------------------- ### Run the Python Cleanup Script Source: https://github.com/cloudinary/pycloudinary/blob/master/samples/basic/README.md Execute the Python script with the 'cleanup' argument to delete uploaded images via Cloudinary's Admin API. ```python python basic.py cleanup ``` -------------------------------- ### Upload an Asset Source: https://github.com/cloudinary/pycloudinary/blob/master/README.md Upload a local asset to Cloudinary. Ensure the asset path is correct. ```python cloudinary.uploader.upload("my_picture.jpg") ``` -------------------------------- ### Generate Cloudinary URL for Transformation Source: https://github.com/cloudinary/pycloudinary/blob/master/README.md Use this utility to generate a URL for an asset with specified transformations like width, height, and crop. ```python cloudinary.utils.cloudinary_url("sample.jpg", width=100, height=150, crop="fill") ``` -------------------------------- ### Rebase and Force Push Changes Source: https://github.com/cloudinary/pycloudinary/blob/master/CONTRIBUTING.md Rebase your feature branch onto the latest upstream master and force push it to your origin. ```bash git fetch upstream git rebase upstream/master git push origin my-feature-branch -f ``` -------------------------------- ### Set CLOUDINARY_URL (tcsh/csh) Source: https://github.com/cloudinary/pycloudinary/blob/master/samples/basic/README.md Configure the CLOUDINARY_URL environment variable for authentication. This command is for tcsh or csh shells. ```shell setenv CLOUDINARY_URL cloudinary://API-Key:API-Secret@Cloud-name ``` -------------------------------- ### Create a Feature Branch Source: https://github.com/cloudinary/pycloudinary/blob/master/CONTRIBUTING.md Update your local master branch from upstream and create a new topic branch for your changes. ```bash git checkout master git pull upstream master git checkout -b my-feature-branch ``` -------------------------------- ### Push Feature Branch Source: https://github.com/cloudinary/pycloudinary/blob/master/CONTRIBUTING.md Push your local feature branch to your remote repository. ```bash git push origin my-feature-branch ``` -------------------------------- ### Run Flask Server with Cloudinary URL Source: https://github.com/cloudinary/pycloudinary/blob/master/samples/basic_flask/README.md Set the CLOUDINARY_URL environment variable to your Cloudinary credentials before running the Flask application. This variable contains your API key, secret, and cloud name. ```bash $ CLOUDINARY_URL=cloudinary://API-Key:API-Secret@Cloud-name python app.py ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.