Metadata-Version: 2.1
Name: psycho
Version: 1.0.1
Summary: A tool to manage python projects and their dependencies.
Author-email: Rob Blackbourn <rob.blackbourn@gmail.com>
License: Apache-2.0
Project-URL: Repository, https://github.com/rob-blackbourn/psycho
Project-URL: Issues, https://github.com/rob-blackbourn/psycho/issues
Keywords: pyproject.toml,pip
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: click >=8.1.8
Requires-Dist: tomlkit >=0.13.2
Requires-Dist: packaging >=24.2
Requires-Dist: build >=1.0.0
Requires-Dist: twine >=6.1.0

# psycho

Python project management automation using standard build tools.

## Status

This project is a working prototype.

It can be installed from pypi. Its probably best to install as a user
dependency, or in a virtual environment.

```bash
pip 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 the standard tools:

* [pip](https://pypi.org/project/pip/)
* [build](https://pypi.org/project/build/)
* [twine](https://pypi.org/project/twine/)

## Psychotic Commands

The following are supported.

* init
* install
* uninstall
* build
* upload
* publish

### init

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

```bash
$ 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.

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

There is one further flag `--create local-venv` which creates the standard
project structure, which a local virtual environment.

### install

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

```bash
$ 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`.

```bash
$ psycho install "pandas>=1.5.3"
```

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

```bash
$ 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`.

```bash
$ psycho uninstall pandas
```

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

```bash
$ psycho install --optional dev pytest
```

### build

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

```bash
$ psycho build
```

This is the equivalent of `python -m build`.

### upload

The upload command will upload a package with twine.

```bash
$ psycho upload
```

This is the equivalent of `twine upload dist/*`.

### publish

This combines the build and publish in one command.

```bash
$ psycho publish
```
