____   ___  _   _ _____       _        ____
|  _ \ / _ \| | | | ____|     | |      | __ )
| |_) | | | | |_| |  _|      | |      |  _ \
|  __/| |_| | _| | |___ _____| |____  | |_) |
|_|    \___/ \_| |____|_____|______| |____/

micro-service platform

22 stdlib-only python micro-services with a unified gateway. zero dependencies, zero api keys. runs on a raspberry pi or a vps.

python 3.12 stdlib only MIT licensed
services

what's included

each service is a single python file with no external dependencies. start them individually or behind the gateway.

serviceportdescriptionendpoint
gateway8700unified api entry point — routes to all servicesPOST /api/{service}/{action}
link-preview8765extracts title, description, image from urlsPOST /api/preview
keyword-extractor8766extracts keywords and key phrases from textPOST /api/extract
qr-generator8767generates qr codes as svg from text/urlsPOST /api/qr
dns-lookup8768resolves domain names to ip addressesPOST /api/resolve
color-palette8769generates harmonious color palettesPOST /api/generate
text-summary8770extracts key sentences from textPOST /api/summarize
url-shortener8771creates short codes for long urlsPOST /api/shorten
password-generator8772generates secure random passwordsPOST /api/generate
timestamp-converter8773converts between unix timestamps and human datesPOST /api/convert
json-formatter8774validates, formats, minifies jsonPOST /api/format
base64-tool8775encodes and decodes base64 and url-safe base64POST /api/encode
markdown-render8776converts markdown to htmlPOST /api/render
sentiment8777analyzes text sentiment (positive/negative/neutral)POST /api/analyze
hash-gen8779generates hashes (md5, sha1, sha256, sha512)POST /api/hash
webhook-relay8779receives webhooks, logs events, dispatches to servicesPOST /api/webhook
uuid-gen8780generates uuids (v1, v4, v7)POST /api/generate
rate-limiter8780token bucket rate limiting for the platformPOST /api/check
timestamp-conv8781unix / iso8601 / rfc2822 conversionPOST /api/convert
email-validator8781validates email format, mx records, checks disposable domainsPOST /api/validate
barcode-gen8782generates barcodes (code39, code128-b, ean-13)POST /api/generate
status-dashboard8790real-time health monitor for all servicesGET /api/status
health-agg8791unified health check for all council servicesGET /api/health
service details

deep dive

every service follows the same pattern: a single python file, stdlib only, with a health endpoint and a json api.

link-preview

port 8765

extracts open graph and html metadata from any url. fetches the page, parses title, description, and image. returns clean json. no external dependencies — uses urllib and html.parser from stdlib.

$ curl -X POST http://localhost:8765/api/preview \
  -H "Content-Type: application/json" \
  -d '{"url": "https://github.com"}'
{
  "title": "GitHub: Let's build from here",
  "description": "GitHub is where people build software...",
  "image": "https://github.com/fluidicon.png",
  "url": "https://github.com"
}

sentiment

port 8777

analyzes text sentiment using a lexicon-based approach. no ml models, no api calls. just word scoring against a built-in sentiment dictionary. returns positive, negative, or neutral with a confidence score.

$ curl -X POST http://localhost:8777/api/analyze \
  -H "Content-Type: application/json" \
  -d '{"text": "this project is amazing and well built"}'
{
  "sentiment": "positive",
  "score": 0.72,
  "words": ["amazing", "well", "built"]
}

qr-generator

port 8767

generates qr codes as inline svg. no image libraries needed — builds the svg markup directly from the qr encoding algorithm. supports any text or url input.

$ curl -X POST http://localhost:8767/api/qr \
  -H "Content-Type: application/json" \
  -d '{"data": "https://pokelabs.org"}'
{
  "svg": "<svg xmlns=...>...</svg>",
  "size": 25,
  "format": "svg"
}

color-palette

port 8769

generates harmonious color palettes from a base color. supports analogous, complementary, triadic, and split-complementary modes. returns hex, rgb, and hsl values.

$ curl -X POST http://localhost:8769/api/generate \
  -H "Content-Type: application/json" \
  -d '{"base": "#00d4ff", "count": 5, "mode": "analogous"}'
{
  "palette": ["#00d4ff", "#00a3cc", "#007a99", "#005266", "#002a33"],
  "mode": "analogous"
}

hash-gen

port 8779

generates cryptographic hashes from text or file content. supports md5, sha1, sha256, sha512, and blake2b. useful for checksums, data integrity verification, and content addressing.

$ curl -X POST http://localhost:8779/api/hash \
  -H "Content-Type: application/json" \
  -d '{"text": "hello world", "algorithm": "sha256"}'
{
  "hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
  "algorithm": "sha256"
}

barcode-gen

port 8782

generates barcodes as svg. supports code39, code128-b, and ean-13 formats. pure python implementation — no external libraries needed.

$ curl -X POST http://localhost:8782/api/generate \
  -H "Content-Type: application/json" \
  -d '{"data": "123456789012", "format": "ean13"}'
{
  "svg": "<svg xmlns=...>...</svg>",
  "format": "ean13"
}
api

try it

all services expose post endpoints with json. the gateway routes for you — or call services directly.

# via gateway (recommended)
$ curl -X POST http://localhost:8700/api/sentiment/analyze \
  -H "Content-Type: application/json" \
  -d '{"text": "this is amazing"}'

$ curl -X POST http://localhost:8700/api/password/generate \
  -H "Content-Type: application/json" \
  -d '{"length": 20}'

# direct service call
$ curl -X POST http://localhost:8767/api/qr \
  -H "Content-Type: application/json" \
  -d '{"data": "https://pokelabs.org"}'

# every service has a health endpoint
$ curl http://localhost:8774/api/health
{"ok": true, "v": 1, "service": "json-formatter"}
architecture

how it works

gateway on :8700 proxies requests to individual services. each service is a single python file you can run, modify, or replace independently.


  client
      ↓ POST /api/sentiment/analyze
  gateway (:8700)
      ↓ proxy to localhost:8777
  sentiment (:8777) → lexicon analysis → json response

  # each service is independent
  link-preview (:8765)    → fetch url → extract metadata
  keyword-extractor (:8766) → tf scoring → ranked keywords
  dns-lookup (:8768)      → socket.getaddrinfo → ip list
  qr-generator (:8767)     → svg generation → inline data
  color-palette (:8769)    → chroma math → hex/rgb list
  ...

  # add a service: create server.py → register in gateway → done
deploy

run it anywhere

docker, docker-compose, or bare python. pick your flavor.

docker compose

the fastest way to run all 22 services. one command, everything starts.

$ git clone https://github.com/pokelabshq/council
$ cd council && docker compose up

single service

run just the services you need. no containers required.

$ cd poke-services/link-preview
$ python3 server.py
# listening on :8765

pip install

install the council cli and run services from your terminal.

$ pip install pokelabs
$ pokelabs gateway start

health checks

every service exposes /api/health. use it for monitoring or load balancer checks.

$ curl localhost:8700/api/health
{"ok": true, "services": 22, "failed": 0}
stats

by the numbers

zero npm installs. zero api keys. zero framework lock-in.

22
services
0
dependencies
1
language
1
license