Skip to content
Python dependency management via Poetry
Branch: master
Clone or download
Latest commit 0e7f145 May 3, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Add .gitignore Mar 24, 2019
poetry.lock Update dependencies May 3, 2019
pyproject.toml Bump to 0.1.4 May 3, 2019

Build Status PyPI version


Jetty is a very thin wrapper around Poetry, the dependency and package management tool. Unlike Poetry, which assumes you are using it with a package, Jetty is singularly focused on dependency management. Jetty accomplishes three things:

  1. Removes Poetry's requirement to specify a package name, version and description in pyproject.toml.
  2. Removes all commands that aren't related to dependency management.
  3. Provides a programmatic interface to all of the supported commands.

The interface is automatically generated from Poetry's command line definitions. So for example, if you would normally run:

$ poetry install --dry-run

The equivalent in code becomes:

from jetty import Project
project = Project()

Otherwise Jetty shamelessly uses Poetry's logic and commands wholesale.


When should I consider Jetty?

There are only a few special circumstances where you might want to consider Jetty:

A. You want to lock dependencies for Python modules that aren't structured as a package. For example, maybe you are working in a monorepo where modules can be imported across the repo without the need for packaging.

B. You are developing tools that use dependency locking. Jetty's programmatic API is handy for this scenario.

Why not just use Poetry or Pipenv?

Tools like Poetry and Pipenv are really cool and useful for managing your Python packages, but they assume that you are working with a package. If you are working with a simple python script or creating tooling for a monorepo, their self imposed workflows fall apart very quickly (or they don't even work at all).

To be clear, if you are working with a Python package and don't need to call these APIs programmatically, then Jetty doesn't offer you any benefits. Just use Poetry, it is awesome!

Why didn't you wrap pip-tools instead?

Pip-tools is another awesome project, which does focus solely on dependency management. But it still doesn't have a programmatic API, and the UX is a bit less polished than what one might expect from Poetry or Pipenv. Plus after spending some time looking at both codebases, I saw an easier path forward for wrapping Poetry.

Aren't you just packaging up Poetry and passing it off as your own?

Sort of? Jetty uses Poetry as a dependency without modification, everything is accomplished via wrapping. In the future, I may attempt to cut out modules that aren't necessary to dependency management. Depending if this project works out for my use case, I may also attempt to upstream whatever makes sense.

Poetry is an awesome project that I whole-heartedly recommend and I make no claims for taking credit.

You can’t perform that action at this time.