Skip to main content

A tool to manage python projects and their dependencies.

Project description

Let's go psycho!

Python project management automation using standard build tools.

Status

This project is a working prototype.

This package is available from pypi, but the best way to install it is with pipx.

pipx install psycho

Overview

Python projects are migrating away from using setup.py to pyproject.toml. While a number of excellent projects provide custom tooling, there is no built in support for automating project management with just the standard tools:

Psychotic Commands

The following are supported.

  • init
  • install
  • uninstall
  • build
  • upload
  • publish

init

Makes a new pyproject.toml. The command prompts for input.

$ psycho init
Name: my-package
Version [0.1.0]: 
Description: My package
Author: rob
Email: rob@example.com
Initializing my-package

Alternatively values can be provided as arguments.

$ psycho init \
    --name my-package \
    --version 0.1.0 \
    --description "My package" \
    --author "Rob Blackbourn" \
    --email "rob@example.com"

Or by passing -y to accept the defaults.

$ psycho init -y

This creates the standard project structure, with a local virtual environment. It will also upgrade pip and install the project in the virtual environment.

The following flags are also supported:

  • --no-venv to not create a virtual environment.
  • --no-tests to not create the tests folder.
  • --no-upgrade to prevent the venv dependencies being upgraded (pip).
  • --venv <venv-name> to give the venv folder a specific name (the default is ".venv").

install

When used without specifying packages this command installs the project as editable.

$ psycho install

This is the equivalent of pip install --editable ..

When used with a package requirement, the requirement is written to the pyproject.toml and the package is installed into the python environment using pip.

$ psycho install "pandas>=1.5.3"

The -optional flag can be used (with a group name) to add an optional dependency.

$ psycho install --optional dev pytest

Most the flags used by pip are available to this command.

uninstall

This command removes a package from the pyproject.toml file, and uninstalls it using pip.

$ psycho uninstall pandas

This can be used with the optional flag (with a group name) to uninstall an optional dependency.

$ psycho uninstall --optional dev pytest

build

The build command will build a package, prior to publishing it.

$ psycho build

This is the equivalent of python -m build.

upload

The upload command will upload a package with twine.

$ psycho upload

This is the equivalent of twine upload dist/*.

publish

This combines the build and publish in one command.

$ psycho publish

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

psycho-2.1.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

psycho-2.1.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file psycho-2.1.1.tar.gz.

File metadata

  • Download URL: psycho-2.1.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for psycho-2.1.1.tar.gz
Algorithm Hash digest
SHA256 c0746554d39069ef4c61ed038d5f674078bfae083dc34fe9c6fef9a608369293
MD5 2faebf2fbd356513c6133beeff47f5ef
BLAKE2b-256 6b218d177c652c5898f40ba07a99ff7f64d134dd5b1ca48881621f6f0e7d6726

See more details on using hashes here.

File details

Details for the file psycho-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: psycho-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for psycho-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af62f0e45d3efade8a6c5d2c24ea00329b09e7299c2f7008bd73b9daa65bbde2
MD5 f7ee9442274886b649716425f8220db3
BLAKE2b-256 c52faa5584040a9a344afa575f7e9858b944d55df6eb8429ccb0938cc09eb0bb

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