Skip to main content

Python Library for Stripe API

Simple Python library that pulls the products from Stripe dashboard in JSON format using only STRIPE_API_KEY as input.

Actively supported by AppSeed via Email and Discord. Available items:

  • Product Meta Information:
    • ID, name, description
  • All Images
  • All Prices
  • The default price
    • separate node for quick access

Quick Start


Install the package via PIP

$ pip install python-stripe

Usage in code

from stripe_python import get_products

STRIPE_KEY  = 'YOUR_key_here' # mandatory parameter  
OUTPUT_FILE = 'products.json' # optional   

get_products( STRIPE_KEY, OUTPUT_FILE ) 

All products associated with the account are pulled in products.json. Here is a sample output using an account with one product (multiple prices):

{
    "data": [
        {
            "id": "prod_L3QBiEdGWquAHl",
            "name": "Django Datta Able PRO",
            "description": "Premium Django Seed project",
            "images": [
                "https://files.stripe.com/links/MDB8YWNjdF8xSGxXdEdHTExkMVgwN1ZVfGZsX3Rlc3RfZjNtOGxwZTRFdGp1MGp1N2ZUeFlENU9Q008T4Zyl6Z"
            ],
            "price_dfault": {
                "price_1KNJKmGLLd1X07VUqu1kDHO2": 99.0
            },
            "prices": {
                "price_1LuEz0GLLd1X07VUpsvuNCT8": 119.0,
                "price_1KNJKmGLLd1X07VUqu1kDHO2": 99.0
            }
        }
    ]
}

Product Image pulled from Stripe

Django Datta Able PRO - Stripe Image


Standalone Execution


Step 1 - Clone the sources from public repository

$ git clone https://github.com/app-generator/python-stripe-wrapper.git
$ cd python-stripe-wrapper

Step 2 - Create .env using provided env.sample

Add .env file in your projects root directory and add the following credentials

STRIPE_API_KEY=<REAL_VALUE_HERE>

Step 2 - Install dependencies

$ python -m venv env
$ source env/bin/activate
$ pip install -r requirements.txt

Step 3 - Pull the products from Stripe dashboard

$ python run.py

The products are saved in products.json (current working directory). Available props:

  • id
  • name
  • description
  • images
  • price (all)

Credits & Links



Python Library for Stripe API - Free library provided by AppSeed.

Download files

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

Source Distribution

python-stripe-0.0.6.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file python-stripe-0.0.6.tar.gz.

File metadata

  • Download URL: python-stripe-0.0.6.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for python-stripe-0.0.6.tar.gz
Algorithm Hash digest
SHA256 9be5321683bf8763c964bf883876ab374126af45794ab27840d92b0d187214f8
MD5 713e7dfcea82c592fdd29c19cee6975d
BLAKE2b-256 edd5ca9cede59b360b7e383f1cd3c9b0f1e0a7d8146e72e1af73b95e0d386a46

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.6 This release

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page