Skip to main content

Framework API Python yang ringan, tegas, dan langsung GAS

Project description

๐Ÿ”ฅ Bah Lol

Framework API Python yang ringan, tegas, dan langsung GAS.

Kalau kamu capek sama framework ribet, kebanyakan config, dan teori panjang, Bah Lol hadir buat satu tujuan:

Bikin API yang BARANG-nya jelas dan langsung jalan.


โœจ Kenapa Bah Lol?

  • โšก Super ringan
  • ๐Ÿ“ฆ Tanpa dependency ribet
  • ๐Ÿง  Mudah dipahami
  • ๐Ÿ˜„ Serius tapi ada senyum dikit
  • ๐Ÿ‡ฎ๐Ÿ‡ฉ Lokal rasa global

Filosofi kami sederhana:

Kalau bisa simpel, kenapa harus ribet.


๐Ÿš€ Instalasi

pip install bah-lol

๐Ÿ”ง Contoh Paling Dasar

from bah_lol import BahLol

app = BahLol()

@app.barang("/jalan")
def jalan():
    return {
        "status": "mantap",
        "pesan": "Server sudah jalan, BARANG ini jelas"
    }

app.gas()

Buka:

http://localhost:8000/jalan

โ›ฝ Konsep Penting di Bah Lol

Istilah Artinya
BARANG Endpoint / fitur
GAS Menjalankan server
BBM Request / payload
OPLOS Middleware
BAHENOL Plugin / extension

๐Ÿ›  CLI Command

bah-lol gas
bah-lol barang users
bah-lol oplos auth
bah-lol bbm
bah-lol bahenol

๐Ÿ“œ Log Khas

๐Ÿ”ฅ GAS dibuka di port 8000
โ›ฝ Request masuk, BBM aman
๐Ÿ“ฆ BARANG siap dipakai

๐Ÿ“ฆ Struktur Project

bah_lol/
โ”œโ”€โ”€ bah_lol/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ app.py          # Core App (router + server)
โ”‚   โ”œโ”€โ”€ router.py       # Registrasi BARANG
โ”‚   โ”œโ”€โ”€ gas.py          # HTTP server (async / sync ringan)
โ”‚   โ”œโ”€โ”€ oplos.py        # Middleware
โ”‚   โ”œโ”€โ”€ logger.py       # Log khas Bah Lol
โ”‚   โ””โ”€โ”€ cli.py          # CLI command
โ”œโ”€โ”€ examples/
โ”‚   โ””โ”€โ”€ basic.py
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ test_barang.py
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ setup.cfg
โ””โ”€โ”€ LICENSE

โš ๏ธ Catatan Penting

Bah Lol ini santai dalam gaya, tapi serius dalam fungsi.

Cocok untuk:

  • Prototype
  • Internal API
  • Demo
  • Project cepat

โค๏ธ Penutup

Kalau API kamu:

  • Jelas
  • Jalan
  • Bisa dipakai

Berarti BARANG-nya sudah benar.

Silakan gas ๐Ÿš€

Key Features Implemented:

  1. Core App (app.py): Main BahLol class with decorators for registering endpoints
  2. Router (router.py): Handles route registration and matching with parameter extraction
  3. Gas Server (gas.py): Lightweight HTTP server implementation
  4. Middleware (oplos.py): Middleware management system
  5. Logger (logger.py): Custom logging with Bah Lol style messages
  6. CLI (cli.py): Command-line interface with all specified commands
  7. Example (examples/basic.py): Shows how to use the framework
  8. Tests (tests/test_barang.py): Unit tests for the framework
  9. Configuration files: pyproject.toml, setup.cfg, and LICENSE

Framework Features:

  • Decorator-based routing (@app.barang)
  • Parameterized routes (/users/)
  • Middleware support (OPLOS)
  • Custom logging with Bah Lol style messages
  • CLI commands (gas, barang, oplos, bbm, bahenol)
  • Lightweight design with minimal dependencies
  • Indonesian-themed naming convention

The framework follows the philosophy of being simple, direct, and getting things done quickly - perfect for prototypes, internal services, and small-to-medium APIs.

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

bah_lol-1.0.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

bah_lol-1.0.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file bah_lol-1.0.0.tar.gz.

File metadata

  • Download URL: bah_lol-1.0.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for bah_lol-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0cba0c6808b46156bd6cc4590fd0ba4e3fa6acc9c4bd144bf4607462505e8117
MD5 8a83f05b2cb07973ba85e7f4a2786962
BLAKE2b-256 6fe42d5aed8aff920ab0f4d88536bcde106bc5d5b1851143ad66d417c9b97e86

See more details on using hashes here.

File details

Details for the file bah_lol-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bah_lol-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for bah_lol-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05637f1d00749d587fa717b777851cecb75dcdac74cc9946a9d8b5c534958df4
MD5 38f9a4bb721b1a204842ef87fa47022e
BLAKE2b-256 588bf191d0e18675f21967e3f3960f353d7974ce1af8d246b0f478c7c7aae7eb

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