*ALWAYS UNDER CONSTRUCTION*

Python Snippets

created:
updated:

list of useful python snippets for my own use

.Env

.env:

KEY=BANANA

shell:

$ uv pip install python-dotenv

code:

import os
from dotenv import load_dotenv

load_dotenv()

KEY = os.getenv("KEY")

JSON

import json

# With file

data = json.load(f)
json.dump(data, f)

# With string

s = "{...}"
data = json.dumps(s)
json.loads(data)

Webmentions[0]

    Q. Why isn't my webmention not appearing?

    A. I deploy this site not so often and this site is static site. So don't expect your webmention to appear instantly. Thanks for the webmention and sorry for the inconvenience.
    last deployed: see footer