A software manager for easy development and distribution of Python code
Project description
Travel
A software manager for easy development and distribution of Python code.
The main features that Travel adds to Python are:
- Support for large-scale, multi-package projects (with common packages)
- Reproducibility (clear, transparent dependency management)
- Robust development-lifecycle, from prototyping to distribution
- Possibility to have different scoped Virtual Environment (e.g. for development, for testing, for notebooks...) with additional requirements
Travel is inspired by what Maven is for Java and uses Pip and Virtual Environments.
Why Travel
Python is great at many things, particularly for scripting. But it is powerful enough to create complex software too. Still, when doing so, it lacks some robustness and quickness.
Instead:
-
Travel lets you forget about repetitive setup of Python projects, with creation of Virtual Environments, issues with imports, PYTHONPATH, folder structures. It does all of this for you.
-
Travel ensures that when you run a Python script, all its requirements are installed. Along with reproducibility, this makes room for easy collaboration between developers.
-
Also, while with standard tools it's hard to have multiple packages, one requiring another, with Travel this is a matter of few YAML files. You can split your project in several packages instead of having tons of requirements, code replication and/or single package-monoliths.
All in all, Travel lets you design proper structure and modularity for your code. No worries about imports and low-level stuff.
Example of Travel Project
You can find an example of Travel project here.
Installation
With Python >= 3.7 < 3.10, simply run
pip install travel
From now on, you can use travel
from command line.
Create a new project or add a new Bag
Travel supports several packages ("Bags") in a single project, nested in other folders ("Bags containing Bags"). You can create a project using Travel Plans.
You can also create a new Bag after the first plan using travel add
, to add a new Travel Plan.
For a quick understanding, see below.
Basic Usage
To see how to create your first Travel project, see the section above.
Once you have defined your structure of Bags (submodules of your project), for instance like in the example or like this
complexproject/
common/
package/
bag.yml
microservices/
first/
package/
bag.yml
second/
package/
bag.yml
bag.yml
bag.yml
you can run
travel setup
in the main folder, where the first bag.yml
file is located.
This will:
- Understand the dependencies
- Create the Virtual Environments
- Install the requirements
- Install the packages themselves in development mode (so that you can
import
them in their Virtual Environments)
You can also create a distribution package with travel pack [commands]
, which is the equivalent of python setup.py [commands]
, for instance:
travel pack sdist
in the folder of the Bag you want to pack. This will create the distribution in the ./build/package/dist
folder.
In any moment, you can run
travel clean
to destroy the Virtual Environments and other build objects.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file travel-0.8.1.tar.gz
.
File metadata
- Download URL: travel-0.8.1.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a8eac253507f4e473d05ef714a30dda7b8bd50e0d45e58a68087d9aeb10d3d5 |
|
MD5 | a5ffe053050eeacdfe9fe46bd6211d64 |
|
BLAKE2b-256 | 6f86eb75049bb73a8780306acb5cff93daf43a69b4420038826ee713e924e00d |