GithubHelp home page GithubHelp logo

heroku / buildpacks-python Goto Github PK

View Code? Open in Web Editor NEW
26.0 45.0 2.0 288 KB

Heroku's Cloud Native Buildpack for Python applications.

License: BSD 3-Clause "New" or "Revised" License

Rust 100.00%
heroku cloud-native-buildpacks python heroku-languages

buildpacks-python's Introduction

Heroku Cloud Native Buildpack: Python

Cloud Native Buildpacks Registry: heroku/python CI on Github Actions: heroku/python

Heroku Cloud Native Buildpack: heroku/python

heroku/python is the Heroku Cloud Native Buildpack for Python applications. It builds Python application source code into application images with minimal configuration.

Important

This is a Cloud Native Buildpack, and is a component of the Heroku Cloud Native Buildpacks project, which is in preview. If you are instead looking for the Heroku Classic Buildpack for Python (for use on the Heroku platform), you may find it here.

Usage

Note

Before getting started, ensure you have the pack CLI installed. Installation instructions are available here.

To build a Python application codebase into a production image:

$ cd ~/workdir/sample-python-app
$ pack build sample-app --builder heroku/builder:22

Then run the image:

docker run --rm -it -e "PORT=8080" -p 8080:8080 sample-app

Application Requirements

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

Configuration

Python Version

By default, the buildpack will install the latest version of Python 3.12.

To install a different version, add a runtime.txt file to your app’s root directory that declares the exact version number to use:

$ cat runtime.txt
python-3.12.3

In the future this buildpack will also support specifying the Python version via a .python-version file (see #6).

Contributing

Issues and pull requests are welcome. See our contributing guidelines if you would like to help.

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.