barn
barn is a Python-based command-line interface (CLI) tool that simplifies package management by providing an intuitive set of commands. It was inspired by the yarn counterpart from Javascript. Hence the interface was kept as similar as possible, so that if you are familiar with yarn you should pickup barn relatively fast.
Note Barn is just a pip wrapper, so package resolution is still completely up to pip and your installed pip version
Features
- Install packages
- Add new packages
- Initialize new projects with interactive prompts
- Ability to define script scoped to your project, like you would do with a package.json
⚠️ A small invite to caution
Barn is still in development and can be unstable. More over:
- It currently only supports python 3.9 and it is only officially tested on 3.9.13
- It still lacks core feature that hopefully will be added soon
How to use
You can install barn directly with the following pip command:
Note You are encouraged to install barn globally on your system
pip install python-barn
You can initialise an empty directory to be a barn project by running:
barn init
This will launch an interactive prompt asking for details such as project name, description, author, etc.
In case your project already exists and it's not an empty folder, you can create the project.yaml file with the following content:
name: my-project
description: Some description
version: 0.1.0
author: your-name or your team name
scripts:
- start: python ./main.py
- test: echo "Not implemented"
license: your-license
Install project dependencies
barn
or
barn install
Add a new package:
barn add <package-name>
Remove a package:
barn remove <package-name>
To setup custom scripts
In the project.yaml, you can specify bash scripts by adding to the scripts section:
scripts:
- start: python ./main.py
Once you have your script defined you can run:
barn <script-name>
In this case:
barn start
This will run your script in the context of the project, with the correct python version and pointing to the correct virtual environment
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for python-barn 0.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python_barn-0.11.0.tar.gz | 8.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_barn-0.11.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.5 kB
Release files / python_barn-0.11.0.tar.gz
| Download URL | python_barn-0.11.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fb682e3e92bbb21f8ec89c8c343a10ba6eb1d14d7054c7368853f2acbc5517a
|
|
BLAKE2b-256 checksum How to use checksums |
a575f08669b0e8ffbf4326b72634c2349ebbd872f4c512f6d445e8caca024509
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / python_barn-0.11.0-py3-none-any.whl
| Download URL | python_barn-0.11.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcda6827f598d17814f500482b7124692ce5fe8e5c214152abf85a2585deb496
|
|
BLAKE2b-256 checksum How to use checksums |
c9152ddebce9430664ba8e01517529ef47432e566c8d4eec8c59a3a589a6d369
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for python-barn 0.11.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.