Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shorten URL - Shorty</title>
<style>
* {
margin: 0;
padding: 0;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>URL Shortened - Shorty</title>
<style>
* {
margin: 0;
padding: 0;
#!/usr/bin/env python3
import argparse
import asyncio
import time
from mkvdb import Mkv
# ------------------------------------------------------------------------------
# SYNC BENCHMARKS
@patx
patx / pickledb1-4_benchmark.py
Created December 10, 2025 19:30
Script used to benchmark pickleDB v1.4
#!/usr/bin/env python3
import argparse
import asyncio
import os
import time
from pathlib import Path
from pickledb import PickleDB
@patx
patx / kenobi.py
Created December 9, 2025 09:01
source code for KenobiDB (https://pypi.org/project/kenobi/)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
KenobiDB is a small document-based DB, supporting simple usage including
insertion, removal, and basic search.
Written by Harrison Erd (https://patx.github.io/)
https://patx.github.io/kenobi/
"""
# Copyright Harrison Erd
#

🥝 The Officially Unofficial, Shamelessly Sarcastic Guide to MicroPie

Table of Contents:

  1. What Even Is This
  2. Installation: Your First Mistake
  3. Hello, World, You Minimalist Freak
  4. Routing: Guess the URL by Reading a Method Name
  5. Parameters: MicroPie Sees All
  6. Sessions: For When You Need to Remember Your Regret
#!/usr/bin/env python3
# fastPATX (PyQt6)
from __future__ import annotations
import os
import sys
import webbrowser
from dataclasses import dataclass
from pathlib import Path
@patx
patx / file_upload_benchmark.md
Created August 17, 2025 02:52
ai generated test result report

🚀 Benchmark: Large File Uploads

MicroPie is built around streaming-first multipart handling, with no heavyweight form parsers.
This design keeps memory usage low and avoids the double-copy overhead seen in other frameworks.

We benchmarked a 13.4 GiB file upload against FastAPI, Litestar, and Starlette on the same machine.

Results

| Framework | Upload Handler Summary | Multipart Parser | Elapsed (13.4 GiB) | Throughput |

@patx
patx / benchmark_review.md
Last active December 7, 2025 18:10
Latest benchmarks for new MicroPie release (v0.17)

Benchmarking Python Web Frameworks: Blacksheep, Starlette, MicroPie, Quart, FastAPI

I created minimal apps for each framework, all returning {"Hello": "World"} as JSON. They ran on Uvicorn with a single worker for baseline performance. Tests hit http://127.0.0.1:8000 with wrk (15s, 4 threads, 64 connections).

Blacksheep

from blacksheep import Application, get, json

app = Application()
@patx
patx / benchmark998.md
Created May 30, 2025 00:24
benchmark for micropie v0.9.9.8

Benchmarks for MicroPie v0.9.9.8

Extremely simple comparisons between fast ASGI frameworks. Each framework used uvicorn as the server using uvicorn file:app --workers 4. Tests were performed on a Dell XPS 13 with 16GB of RAM.

MicroPie

from MicroPie import App

class Root(App):

    async def index(self):