Skip to main content

A simple packaging tool for simple packages.

Project description

Flit is a simple way to put Python packages and modules on PyPI.

Say you’re writing a module foobar—either as a single file foobar.py, or as a directory—and you want to distribute it.

  1. Make sure that foobar’s docstring starts with a one-line summary of what the module is, and that it has a __version__:

    """An amazing sample package!"""
    
    __version__ = '0.1'
  2. Create a file foobar-pkg.ini. It should look like this:

    [metadata]
    author=Sir Robin
    author-email=robin@camelot.uk
    home-page=http://github.com/sirrobin/foobar
    
    # If you want command line scripts, this is how to declare them.
    # If not, you can leave this section out completely.
    [scripts]
    # foobar:main means the script will do: from foobar import main; main()
    foobar=foobar:main

    There are other fields you can add - see the pkg.ini page of the docs.

  3. Install flit if you don’t already have it:

    pip install flit
  4. Run this command to upload your code to PyPI:

    flit foobar wheel --upload

To install a package locally for development, run:

flit foobar install [--symlink]

Flit packages a single importable module or package at a time, using the import name as the name on PyPI. All subpackages and data files within a package are included automatically.

Flit requires Python 3, but you can use it to distribute modules for Python 2, so long as they can be imported on Python 3.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

flit-0.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file flit-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for flit-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2fa3ac585d9828b7e8514bd98af593f5059e0e0d7b2547188217477951758375
MD5 c7a78e855a16df000e7ac136c5d0c348
BLAKE2b-256 0979179baf5d12ef8f49e1d1332e42f6311d4bfdc4fd9ae7f95926bb35466392

See more details on using hashes here.

Supported by

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