Skip to main content

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, and pre-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 using pre-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

uv

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


Download files

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

Source Distribution

usethis-0.3.0.tar.gz (113.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usethis-0.3.0-py3-none-any.whl (59.3 kB view details)

Uploaded Python 3

File details

Details for the file usethis-0.3.0.tar.gz.

File metadata

  • Download URL: usethis-0.3.0.tar.gz
  • Upload date:
  • Size: 113.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.16

File hashes

Hashes for usethis-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8407f4eb36148d20650ab2db4d9ef370166af7b6f2f6e0f2182ea65bcaa4726b
MD5 a25c5af26c3c3d22aa5467021329c87e
BLAKE2b-256 a9c7e3bd0b1c2c51a136d46b098a3ed757bbf68aab0dcaf631ca2b074fd9dae2

See more details on using hashes here.

File details

Details for the file usethis-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: usethis-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 59.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.16

File hashes

Hashes for usethis-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbdaa832b62bcbc1e8e09db7124c82a4f14fdc404722fe4d0a3023b01526adac
MD5 b5f2b0686f906758141cea6f4fdf0a24
BLAKE2b-256 f63b8cb25f47435c2b5cea87fd082ec4e9bb9ed3aa21f9ceb4dbbe9b854a4b81

See more details on using hashes here.

Supported by

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