Skip to main content

Scripticus server

The index service for Scripticus, a package manager and registry for scripts. The server provides manifest-aware search, version listing, and the atomic publish path for a Scripticus registry. Installing this package provides the scripticus-svr command.

Running the server

scripticus-svr starts the service, printing its version and address on start-up:

$ scripticus-svr --host 0.0.0.0 --port 8000
scripticus-svr 0.1.0 — serving on http://0.0.0.0:8000 (interactive API docs at http://0.0.0.0:8000/docs)

Both options are optional; the default is 127.0.0.1:8000. The API is self-describing: interactive docs are served at /docs and the OpenAPI spec at /openapi.json.

Health check

GET /health returns 200 with {"status": "ok"} while the service is up. It is deliberately unauthenticated — it's a liveness probe for load balancers and container orchestrators.

Version

GET /version returns the running server's version, e.g. {"version": "0.1.1"}.

Package index (read API)

  • GET /packages/{namespace}/{name} — a package's version listing, newest first by semver precedence. Yanked versions are included and marked ("yanked": true) so pinned lookups can still see them; unknown packages return 404.
  • GET /search?q=<substring>&platform=<os>&language=<lang> — packages whose name contains q (all parameters optional), with each result's latest non-yanked version. Yanked versions are invisible to search; platform and language filter on the artifacts a version actually provides.

The index database defaults to a local SQLite file (scripticus-index.db); set SCRIPTICUS_INDEX_DB to any SQLAlchemy URL to point elsewhere. Tables are created automatically on first use.

Publishing

POST /packages publishes a package version: a multipart upload of one or more archives — a version's whole format-group set, as produced by scripticus pack, one repeated archives part each — with your Gitea token in the Authorization header. This is what scripticus publish does for you; the raw request looks like:

$ curl -X POST http://localhost:8000/packages \
    -H "Authorization: token <your-gitea-token>" \
    -F archives=@my_tool-1.0.0-linux.macos-bash.tar.gz \
    -F archives=@my_tool-1.0.0-windows-bash.zip

The server trusts nothing about the upload: it re-validates every archive's manifest and package tree, checks the batch is one content tree in different archive formats, computes the content hash, checks with Gitea (live) that your token may publish to the manifest's namespace — your own username, or an organisation you belong to — stores the blobs in Gitea's generic package registry, and only then commits the index record. The batch is atomic: if any archive fails validation or any write fails, nothing is published. Versions are immutable; the one addition an existing version accepts is an artifact in a new archive format carrying the identical content hash. Declared package dependencies must be fully namespaced and already present in the index, and a publish that would create a dependency cycle is rejected. The library namespace is reserved. The Gitea instance is configured with SCRIPTICUS_GITEA_URL (default http://localhost:3000).

Docker

Server releases publish a Docker image to kevinchannon/scripticus-server (tagged with the release version and latest). The repository's docker-compose.yml is the full registry bundle — a reverse proxy fronting the index service and the Gitea instance that provides storage, authentication, and namespace ownership — and needs no checkout. The proxy is the single URL clients use (http://localhost:8000): it routes blob downloads to Gitea and everything else to the index, so a client needs no Gitea address of its own (D45). Gitea's web UI stays on http://localhost:3000 for first-run setup.

$ curl -LO https://raw.githubusercontent.com/kevinchannon/scripticus/main/docker-compose.yml
$ docker compose up -d
$ curl http://localhost:8000/health
{"status":"ok"}

First-run Gitea setup: accounts and organisations are managed in Gitea (http://localhost:3000), and a Scripticus namespace is a Gitea user or organisation, claimed first-come-first-served, with publish rights following Gitea's own membership and ACLs. So, once the bundle is up:

  1. Register your user in the Gitea web UI (the first registered user is the instance admin), and create an organisation for any shared namespace you want.
  2. Generate a token under Settings → Applications → Manage Access Tokens with package write and user read scopes.
  3. Publish with that token (see above).

Licence

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scripticus_server-0.4.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scripticus_server-0.4.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file scripticus_server-0.4.0.tar.gz.

File metadata

  • Download URL: scripticus_server-0.4.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for scripticus_server-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e5ff531e47c463d1ff89bd93f1907fd48d8440e2537f9fe4cdb4ded78fe889e3
MD5 fdcece4ce5a04dc2c0a5f8438bd58157
BLAKE2b-256 01b25fe46ed843149456909a8d89df897f11edfa2e3493ad57ccce9fdba92466

See more details on using hashes here.

Provenance

The following attestation bundles were made for scripticus_server-0.4.0.tar.gz:

Publisher: release.yml on kevinchannon/scripticus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scripticus_server-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for scripticus_server-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28b63a61427fbac603c84caed28961d3eff6a6d79545e7ffe5157d1fe2685f33
MD5 660e9d8bfe7c907d06bda74a2c313035
BLAKE2b-256 a7757b270a49342dda21137cbb264b8be2f8069902e15841fac8cfe45805cea1

See more details on using hashes here.

Provenance

The following attestation bundles were made for scripticus_server-0.4.0-py3-none-any.whl:

Publisher: release.yml on kevinchannon/scripticus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page