Python client for the omg.lol API — weblog, pastebin, PURLs, statuslog, DNS, and more
Project description
omglol
Python client and CLI for the omg.lol API — weblog, pastebin, statuslog, PURLs, DNS, /now page, and more.
Setup
uv sync
cp .env.example .env # add your API key and address
Get your API key at home.omg.lol/account.
CLI
After uv sync, the omglol command is available:
# Publish markdown files to your weblog
omglol post article.md draft.md
# List weblog posts
omglol posts list
# Get a specific post
omglol posts get my-post-slug
# Delete a post
omglol posts delete my-post-slug
# Manage pastes
omglol paste list
omglol paste create my-note "Some content here"
omglol paste get my-note
omglol paste delete my-note
# Post and list statuses
omglol status post "Working on something cool"
omglol status post "Celebrating!" --emoji "🎉"
omglol status list
# Manage PURLs (persistent redirects)
omglol purl list
omglol purl create gh https://github.com/you
omglol purl delete gh
# /now page
omglol now get
omglol now update "Currently learning Rust"
# DNS records
omglol dns list
omglol dns create CNAME www example.com
omglol dns delete <record-id>
# Web page / profile
omglol web get
omglol web update "<h1>Hello</h1>"
omglol web update - < page.html # read from stdin
# Email forwarding
omglol email get
omglol email set me@example.com
# Profile picture
omglol pfp avatar.png
# Account info
omglol info
Dry run
Preview what would be sent without making changes:
omglol --dry-run post article.md
omglol --dry-run status post "Test"
omglol --dry-run dns create A @ 1.2.3.4
Library
from omglol import OmgLol
client = OmgLol(api_key="your_key", address="yourname")
# Weblog
client.post_markdown("my-post.md")
client.create_post(title="Hello World", content="This is my post.")
for post in client.list_posts():
print(post.title, post.location)
client.delete_post("my-post-slug")
# Pastebin
client.create_paste("notes", "Some text")
for paste in client.list_pastes():
print(paste.title)
# Statuslog
client.post_status("Hello from the API!", emoji="🎉")
for status in client.list_statuses():
print(status.emoji, status.content)
# PURLs
client.create_purl("gh", "https://github.com/you")
for purl in client.list_purls():
print(f"{purl.name} → {purl.url}")
# /now page
now = client.get_now()
print(now.content)
client.update_now("Currently building things")
# DNS
for rec in client.list_dns_records():
print(f"{rec.record_type} {rec.name} → {rec.data}")
client.create_dns_record("CNAME", "www", "example.com")
# Web page / profile
client.update_web("<h1>My page</h1>")
# Email forwarding
client.set_email_forwarding("me@example.com")
# Profile picture
client.upload_pfp("avatar.png")
# Account
info = client.get_address_info()
All list/get methods return typed dataclasses (Post, Paste, Status, Purl, DnsRecord, NowPage) instead of raw dicts.
Markdown frontmatter
Weblog posts can include optional frontmatter:
---
title: My Post Title
date: 2026-03-14 12:00
slug: custom-slug
---
Body content here...
If no frontmatter is present, the first # Heading is used as the title.
Environment variables
| Variable | Description |
|---|---|
OMGLOL_API_KEY |
Your omg.lol API key |
OMGLOL_ADDRESS |
Your omg.lol address (e.g. olivier) |
Development
uv sync
uv run pytest -v
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omglol_api-0.1.0.tar.gz.
File metadata
- Download URL: omglol_api-0.1.0.tar.gz
- Upload date:
- Size: 36.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
391a905d2bd265605ecd2cf51de1251f48642d15cc01897dea1c47fd0fe1b3b0
|
|
| MD5 |
d6bef681d2ad49e343568ab28e8d964f
|
|
| BLAKE2b-256 |
70c723b769afdd1fd245c167a0e130e8090cc9da02036b42ce94972490a2b9c3
|
File details
Details for the file omglol_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: omglol_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29e51723d4deec478392f5f0a020a8fd130eb0f0e20538564c5e9e93e9b128cd
|
|
| MD5 |
d7f1ed83e34d4e2af73c57111f24dd5a
|
|
| BLAKE2b-256 |
0e4ec74237352080d89f23b903512d79fd3607d4320dcf3013064538c109fe87
|