GithubHelp home page GithubHelp logo

digital-sapphire / heroku-buildpack-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heroku/heroku-buildpack-python

0.0 2.0 0.0 59.19 MB

The official Heroku buildpack for Python apps.

Home Page: https://www.heroku.com/python

License: MIT License

Shell 94.26% Makefile 2.20% Dockerfile 1.19% Ruby 2.35%

heroku-buildpack-python's Introduction

python

Heroku Buildpack: Python

Build Status

This is the official Heroku buildpack for Python apps.

Recommended web frameworks include Django and Flask, among others. The recommended webserver is Gunicorn. There are no restrictions around what software can be used (as long as it's pip-installable). Web processes must bind to $PORT, and only the HTTP protocol is permitted for incoming connections.

Python packages with C dependencies that are not available on the stack image are generally not supported, unless manylinux wheels are provided by the package maintainers (common). For recommended solutions, check out this article for more information.

See it in Action

$ ls
my-application		requirements.txt	runtime.txt

$ git push heroku master
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 276 bytes | 276.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.7.4
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting flask (from -r /tmp/build_c2c067ef79ff14c9bf1aed6796f9ed1f/requirements.txt (line 1))
remote:          Downloading ...
remote:        Installing collected packages: Werkzeug, click, MarkupSafe, Jinja2, itsdangerous, flask
remote:        Successfully installed Jinja2-2.10 MarkupSafe-1.1.0 Werkzeug-0.14.1 click-7.0 flask-1.0.2 itsdangerous-1.1.0
remote:
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)
remote:

A requirements.txt must be present at the root of your application's repository to deploy.

To specify your python version, you also need a runtime.txt file - unless you are using the default Python runtime version.

Current default Python Runtime: Python 3.6.9

Alternatively, you can provide a setup.py file, or a Pipfile. Using Pipenv will generate runtime.txt based on python-version at build time.

Specify a Buildpack Version

You can specify the latest production release of this buildpack for upcoming builds of an existing application:

$ heroku buildpacks:set heroku/python

Specify a Python Runtime

Supported runtime options include:

  • python-3.7.4
  • python-3.6.9
  • python-2.7.17

Tests

The buildpack tests use Docker to simulate Heroku's stack images.

To run the test suite:

make test

Or to test in a particular stack:

make test-heroku-18
make test-heroku-16

The tests are run via the vendored shunit2 test framework.

heroku-buildpack-python's People

Contributors

agriffis avatar alexandre-paroissien avatar andres-torres-marroquin avatar caseyfaist avatar chadwhitacre avatar codingjoe avatar craigkerstiens avatar duanehutchins avatar dulacp avatar dzuelke avatar edmorley avatar furious-luke avatar gulopine avatar hone avatar hunterloftis avatar jambonrose avatar jmorrell avatar josegonzalez avatar joshfriend avatar jpadilla avatar kencochrane avatar kennethreitz avatar lstoll avatar mattgraham avatar nsamsami avatar pidelport avatar schneems avatar sigmavirus24 avatar tommyvn avatar tt avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.