Metadata-Version: 2.4
Name: pinme-python
Version: 1.0.1
Summary: Python implementation of the PinMe deployment CLI
Project-URL: Homepage, https://pinme.eth.limo/
Project-URL: Repository, https://github.com/glitternetwork/pinme
Author: Glitter Protocol
License-Expression: MIT
License-File: LICENSE
Keywords: cli,deploy,frontend,ipfs,pinme
Requires-Python: >=3.9
Requires-Dist: requests>=2.31.0
Requires-Dist: urllib3<2
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# PinMe Python

`pinme-python` is a Python implementation of the PinMe CLI. It keeps the
public command surface, local config files, upload protocol, project workflow,
and tracking event names aligned with the Node.js `pinme` CLI.

## Install

```bash
pip install pinme-python
```

For local development:

```bash
python3 -m venv .venv
. .venv/bin/activate
pip install -e ".[dev]"
```

The package installs both command names:

```bash
pinme --version
pinme-python --version
```

## Configuration

The Python CLI uses the same local state as the Node CLI:

- auth file: `~/.pinme/auth.json`
- device id: `~/.pinme/device-id`
- upload history: `~/.pinme/upload-history.json`
- project config: `pinme.toml`

Environment variables match the Node implementation:

- `PINME_API_BASE`
- `IPFS_API_URL`
- `CAR_API_BASE`
- `PINME_WEB_URL`
- `PINME_CHECK_DOMAIN_PATH`
- `IPFS_PREVIEW_URL`
- `PROJECT_PREVIEW_URL`
- `SECRET_KEY`
- `PINME_PROJECT_NAME`
- `FILE_SIZE_LIMIT`
- `DIRECTORY_SIZE_LIMIT`
- `MAX_RETRIES`
- `RETRY_DELAY_MS`
- `TIMEOUT_MS`
- `MAX_POLL_TIME_MINUTES`
- `POLL_INTERVAL_SECONDS`
- `POLL_TIMEOUT_SECONDS`
- `PINME_TRACKER_GATEWAY`
- `PINME_TRACKING_DISABLED`
- `DO_NOT_TRACK`

## Command Parity

```bash
pinme login [--env test|prod]
pinme set-appkey [AppKey]
pinme show-appkey
pinme appkey
pinme logout

pinme upload [path] [--domain name] [--dns]
pinme bind [path] --domain name [--dns]
pinme import [path] [--domain name]
pinme export <cid> [--output dir]
pinme rm [value]

pinme create [name] [--force]
pinme save [--domain name]
pinme update-worker
pinme update-db
pinme update-web
pinme delete [name] [--force]

pinme my-domains
pinme domain
pinme wallet
pinme wallet-balance
pinme balance
pinme list [-l limit]
pinme ls [-l limit]
pinme list --clear
```

## Notes

- Uploads use the same chunk endpoints: `/chunk/init`, `/chunk/upload`,
  `/chunk/complete`, and `/up_status`.
- Project commands still expect the official PinMe Worker template shape:
  `pinme.toml`, `backend/metadata.json`, `dist-worker/worker.js`, `db/*.sql`,
  and `frontend/dist`.
- `create` downloads `glitternetwork/pinme-worker-template` as a zip archive,
  then runs the same `npm run build:*` commands used by the Node CLI.
- Tracking is best-effort and never blocks CLI flows. Disable it with
  `PINME_TRACKING_DISABLED=1` or `DO_NOT_TRACK=1`.
