Skip to main content

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
  • sync
  • 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").

sync

Install the project.

psycho sync

The following flags are also supported:

  • --no-venv to not create a virtual environment.
  • --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

Metadata

Release files for psycho 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for psycho 2.2.0
File Size Uploaded
psycho-2.2.0.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for psycho 2.2.0
File Interpreter ABI Platform
psycho-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.8 kB

Release files / psycho-2.2.0.tar.gz

Download URL psycho-2.2.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
36912e7473a74f351bc3c64431540386a41800866b1a307658551ea59bc75d1c
BLAKE2b-256 checksum
How to use checksums
6b5e01a6be5efd25effd38dfe63043ab92dd1ab7a1a1c79b2bca6f4623b59aa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.13

Release files / psycho-2.2.0-py3-none-any.whl

Download URL psycho-2.2.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae496ce89352cd649ef39cb4bde64d9975db432e9084c995beb99b4ba71b4a63
BLAKE2b-256 checksum
How to use checksums
fa2026ee590d986ea613e2fa3d38cff2f47e1c4c6f9906330197bf9e71707bb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.13
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page