This is prototype Python/Postgres implementation of Memelang v4. This Python script receives Memelang queries, converts them to SQL, executes them on a Postgres database, then returns results as a Memelang string.
File | Purpose |
---|---|
app.py | Command-line interfaces |
conf.py | Postgres database configuration |
db.py | Postgres database helper functions |
parse.py | Encode / decode Memelang strings into meme-token lists |
readme.md | Project overview (this file) |
setup.py | Python package settings |
Installation on Ubuntu:
# Install packages
sudo apt install -y git postgresql python3 python3-psycopg2
sudo systemctl start postgresql
sudo systemctl enable postgresql
# Download files
git clone https://github.com/memelang-net/memesql5.git memesql
cd memesql
# Edit conf.py as you like
# Create database
sudo -u postgres bash -c 'python3 ./app.py install | psql'
import memesql
# Convert a Memelang string to a meme token list
memes = memesql.decode('student=JohnAdams =')
# Convert a meme token list to an SQL query
sqlstr, params = memesql.select(memes)
# Return result Memelang string from database for a Memelang query
result_meme_str = memesql.dbget('student=JohnAdams =')
python3 ./app.py q 'student=JohnAdams ='
# OUTPUT:
b=1234 student="JohnAdams" college="Harvard"
Copyright 2025 HOLTWORK LLC. Patents Pending.