Metadata-Version: 2.4
Name: pyeasydeploy
Version: 1.0.3
Summary: Deploy Python apps to Linux servers over SSH, with plain functions on top of Fabric.
Author: Beltrán Offerrall
License-Expression: MIT
Project-URL: Homepage, https://github.com/offerrall/pyeasydeploy
Project-URL: Documentation, https://offerrall.github.io/pyeasydeploy/
Project-URL: Repository, https://github.com/offerrall/pyeasydeploy
Project-URL: Issues, https://github.com/offerrall/pyeasydeploy/issues
Keywords: deployment,devops,automation,ssh,fabric,supervisor
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Installation/Setup
Classifier: Topic :: System :: Systems Administration
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fabric>=3.0.0
Requires-Dist: pytypehint==1.2.1
Dynamic: license-file

# pyeasydeploy

Deploy Python apps to Linux servers over SSH, with plain Python functions on top of [Fabric](https://www.fabfile.org/): no agents on the server, no YAML, no DSL to learn. Your deploy is a `deploy.py` in your project that reads top to bottom.

It is made for a few servers and a team that writes Python, not to compete with Ansible or Docker.

```python
from pyeasydeploy import (
    Host, Key, SupervisorService, connect, create_venv,
    deploy_supervisor_service, get_target_python_instance,
    install_local_package, supervisor_restart,
)

APP = "myapp"
USER = "deploy"

conn = connect(Host(
    address="203.0.113.10",
    user=USER,
    auth=Key(path="~/.ssh/id_ed25519"),
    sudo_password="...",   # better: os.environ["SUDO_PASSWORD"]
))

py = get_target_python_instance(conn, "3.11")
venv = create_venv(conn, py, f"/home/{USER}/venvs/{APP}")
install_local_package(conn, venv, f"./{APP}")

deploy_supervisor_service(conn, SupervisorService(
    name=APP,
    command=f"{venv.path}/bin/python -m {APP}",
    directory=f"/home/{USER}",
    user=USER,
))
supervisor_restart(conn, APP)
```

The full documentation is at https://offerrall.github.io/pyeasydeploy/.

## Documentation

- [Overview](docs/overview.md): what a deploy does step by step, and what the server needs.
- [Guide](docs/guide.md): connecting, remote Python, venvs and packages, files and services.
- [Reference](docs/reference.md): every public name, its arguments and what it does.
- [Reproducibility](docs/reproducibility.md): what a deploy guarantees, what it does not, and orphan services.
- [Design](docs/design.md): the ideas behind it, and what it is not.

### Maintaining

- [Releasing](docs/releasing.md): the release workflow and the one-time PyPI setup.
