Automate Python project setup and development tasks that are otherwise performed manually.
Project description
usethis
Automate Python project setup and development tasks that are otherwise performed manually.
Inspired by an R package of the same name, this package brings a similar experience to the Python ecosystem as a CLI tool.
Highlights
- First-class support for state-of-the-practice tooling:
uv
,ruff
,pytest
, andpre-commit
. - Automatically add and remove tools: declare, install, and configure in one step.
- Powerful knowledge of how different tools interact and sensible defaults.
- Get started on a new Python project or a new workflow in seconds.
Getting Started
First, it is strongly recommended you install the uv
package manager: this is a simple, documented process.
If you are starting a new project, it is recommended to call uv init --lib
to
initialize the project directory.
Then, you can install usethis for the project:
# With uv
$ uv add --dev usethis
# With pip
$ pip install usethis
Alternatively, run in isolation, using uvx
or pipx
.
Interface
usethis tool
Add a new tool to a Python project, including:
- declared & installed dependencies with
uv add
, - relevant
pyproject.toml
configuration, - any other relevant directories or tool-bespoke configuration files, and
.pre-commit-config.yaml
configuration if usingpre-commit
.
Currently supported tools:
- ruff
- pytest
- deptry
- pre-commit
Example:
usethis tool ruff
Supported arguments:
--remove
to remove the tool instead of adding it--offline
to disable network access and rely on caches
usethis ci
Add Continuous Integration pipelines to the project.
Currently supported platforms:
- Bitbucket
Example:
usethis ci bitbucket
.
usethis browse pypi
Dispaly or open the PyPI landing page associated with another project.
Example:
usethis browse pypi numpy
Supported arguments:
--browser
to open the link in the browser automatically.
Development
This project is at the early stages of development. If you are interested in contributing, please ensure you have a corresponsing GitHub Issue open.
License
usethis is licensed under the MIT license (LICENSE or https://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in usethis by you, as defined in the Apache License, Version 2.0, (https://www.apache.org/licenses/LICENSE-2.0), shall be licensed under the MIT license, without any additional terms or conditions.
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
Built Distribution
File details
Details for the file usethis-0.2.0.tar.gz
.
File metadata
- Download URL: usethis-0.2.0.tar.gz
- Upload date:
- Size: 54.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.4.28
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 940cc4bacc801e97cc0612bfb69b798fb67c31239bad1edcaaa06a488839e740 |
|
MD5 | ee8d3fe702950b8baac318061cbdb2c9 |
|
BLAKE2b-256 | f7a6c2786eab175037d5f8d969862b86538f12207fa543897bcee633505ecc9f |
File details
Details for the file usethis-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: usethis-0.2.0-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.4.28
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4334244a9e0440dd3bdfad5f4c1da80a777d91735f5482f1013a7d7107cc8b58 |
|
MD5 | 12dd87dc2c29e032f49e7bc72e2d329e |
|
BLAKE2b-256 | 7886b7874c16d533274636644e02d0823cdba5f1588ff1051287341b65f454d7 |