Skip to main content

Po-Lang — A high-performance programming language with native AI/ML and HTTP gateway

Project description

Po-Lang Engine

A high-performance, Python-inspired programming language with native AI/ML engine.

Install

pip install po-lang-engine

Run

pop run script.po

v2.3.0 — Production AI Serving + BPP/SSC Security Protocols

  • model["save"](path) — persist trained model weights to .po_model file (JSON)
  • model["load"](path) — restore model instantly, skip re-training
  • req["query"]("key") — URL query param parser (/predict?input=25)
  • sys.exists(path) — check if file/folder exists
  • sys.mkdir(path) — create directory tree (mkdirs)

AI Gateway Example

use ai
use net
import sys

keep model = ai.Trainer("regression")

if sys.exists("models/my_ai_model.po_model") {
    model["load"]("models/my_ai_model.po_model")
    sys.stdout("[AI]: Existing model loaded instantly!\n")
} else {
    sys.stdout("[AI]: Training new model...\n")
    model["fit"]([1,2,3,4,5], [2,4,6,8,10], 200)
    model["save"]("models/my_ai_model.po_model")
    sys.stdout("[AI]: Model saved!\n")
}

keep server = net.listen(8080)

server["route"]("GET", "/predict", fn(req) {
    keep userInput = req["query"]("input")
    keep prediction = model["predict"](userInput)
    return "{ 'status': 'success', 'prediction': " + str(prediction) + " }"
})

server["start"]()

Project details


Download files

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

Source Distribution

po_lang_engine-2.3.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

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

po_lang_engine-2.3.0-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file po_lang_engine-2.3.0.tar.gz.

File metadata

  • Download URL: po_lang_engine-2.3.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for po_lang_engine-2.3.0.tar.gz
Algorithm Hash digest
SHA256 502f1149b01e4c80012345d5b63231cae3f1f21531ee65176994ead13fd83458
MD5 1caf2023bd01ef5251496dc35266ccd0
BLAKE2b-256 852d1187ff82099e3a8cf8d484232dcfa3575a938b9e0dd9b77d664bfb322d35

See more details on using hashes here.

File details

Details for the file po_lang_engine-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: po_lang_engine-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for po_lang_engine-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0d0b2a37d49d83f14270aabab6b932385c90a82ea5f281cc6a37077914ab560
MD5 01c760e03993de2c9b20e5c37e5f38c9
BLAKE2b-256 3cb18f06fadadcb7a199c885a85960882fc14f9f6de0916678af9cc24c15ea84

See more details on using hashes here.

Supported by

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