Metadata-Version: 2.4
Name: gretl
Version: 1.0.2
Summary: Python SDK for Gretl — control local services by name or port number
Author-email: Gretl <info@gretl.dev>
License: MIT
Project-URL: Homepage, https://gretl.dev
Project-URL: Documentation, https://gretl.dev/docs.html
Project-URL: Repository, https://github.com/slowdutch/Gretl
Keywords: port,localhost,devtools,service-manager
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# gretl

Python SDK for [Gretl](https://gretl.dev) — control local services by name or port number.

Gretl is a service manager for developers. Name your services once, run your entire stack with one command, and share it across your whole team.

## Install

```bash
pip install gretl
```

## Quick start

```python
from gretl import gr

# Register a service
gr.register(
    name="jobs-server",
    port=7401,
    group="@jobs"
)

# Resolve a name to a URL
url = gr.url("jobs-server")

# Wait for a service to be up
gr.wait_for("postgres", timeout=30)

# Start / stop by name
gr.start("jobs-server")
gr.stop("jobs-server")

# List all services
services = gr.list()
```

## Requirements

The Gretl desktop app or daemon must be running. Download it at [gretl.dev](https://gretl.dev) — free for individuals, $8/dev/month for teams.

## Links

- [gretl.dev](https://gretl.dev)
- [GitHub](https://github.com/slowdutch/Gretl)
- [npm SDK: @gretl/sdk](https://www.npmjs.com/package/@gretl/sdk)
- [RubyGems: gretl](https://rubygems.org/gems/gretl)
