Giter Club home page Giter Club logo

pipfile's Introduction

Pipfile

Warning: this project is under active development.

A Pipfile is a new (and much better!) way to declare dependencies for your Python environment (e.g. deployment of a web application). It will be a full replacement for the well-pervasive requirements.txt files, currently installable with $ pip install -r.

This is a concept project that will eventually be built into pip itself, once the API (including the form of a Pipfile itself) has been built out and finalized.

Remember, the important part here is Pipfile.lock. It allows deterministic builds. Today's requirements.txt can do this, and should, but often doesn't, when version specifiers aren't provided. This efforts will provide a much more pleasant user experience.

The Concept

A Pipfile will be superior to a requirements.txt file in a number of ways:

  • Expressive Python syntax for declaring all types of Python dependencies.
  • Grouping of sub-dependency groups (e.g. a testing group).
  • Use of a single file only will be extremely encouraged.
  • Pipfile.lock

Example Pipfile

Note—this is an evolving work in progress:

# Note: There will be a default source, and context manager can also be used.
source('https://pypi.org/', verify_ssl=True)

package('requests')
package('Django', '==1.6')
package('pinax', git='git://github.com/pinax/pinax.git', ref='1.4', editable=True)
dev_package('nose')

Example Pipfile.lock

Note—this file is always to be generated, not modified or constructed by a user:

{
    "_meta": {
        "Pipfile-sha256": "73d81f4fbe42d1da158c5d4435d921121a4a1013b2f0dfed95367f3c742b88c6",
        "sources": [
            {"url": "https://pypi.org/", "verify_ssl": true},
        ]
     },
    "default": [
        {"name": "requests", "version": "0.11.2", "hash": "..."},
        {"name": "Django", "version": "1.6", "hash": "..."},
        {"name": "pinax", "git": "git://...", "ref": "1.4", "editable": true},
    ],
    "development": [
        {"name": "nose", "version": "1.3.7", "hash": "..."},
    ]
}

Example Pip Integration (Eventually)

Install packages from Pipfile:

$ pip install -p
! Warning: Pipfile.lock (48d35f) is out of date. Updating to (73d81f).
Installing packages from Pipfile.lock...

# Manually update lockfile.
$ pip freeze -p Pipfile
Pipfile.lock (73d81f) written to disk.

Notes:

# -p accepts a path argument, which defaults to 'Pipfile'.
# Pipfile.lock will be written automatically during `install -p` if it does not exist. 

Ideas:

- Resursively look for `Pipfile` in parent directories (limit 4?) when ``-p`` is bare. 

Documentation

The documentation for this project will (eventually) reside at pypi.org.

Discussion

If you run into bugs, you can file them in our issue tracker.

You can also join #pypa on Freenode to ask questions or get involved.

Code of Conduct

Everyone interacting in the pipfile project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PyPA Code of Conduct.

pipfile's People

Contributors

dstufft avatar kennethreitz avatar nateprewitt avatar nchammas avatar nkanaev avatar

Watchers

 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.