Minimal input, auto path toolkit (mobile-first, Colab+Drive)
Project description
usekit
A lightweight, mobile-first Python toolkit for Memory-Oriented Software Architecture (MOSA).
Code is not function, but memory.
from usekit import u
u.wjb({"hello": "world"}, "config") # write json to base
data = u.rjb("config") # read json from base
u.ujb({"version": "0.1.26"}, "config") # update json
3-letter interface: Verb + Format + Location
Minimal typing. Maximum clarity.
Installation
pip install usekit
Quick Start
from usekit import u, s
# Basic operations
u.wjb({"key": "value"}, "config") # write
data = u.rjb("config") # read
u.ujb({"new": "data"}, "config") # update
u.djb("old") # delete
# Safe mode (returns None on error)
data = s.rjb("missing") or {} # no exceptions
Status
- Version: 0.1.26 (Alpha)
- API: May change
- PyPI: https://pypi.org/project/usekit
Core Pattern
3-Letter Interface
u.[action][format][location]
u.rjb() → read json base
u.wys() → write yaml sub
u.dtb() → delete text base
Actions
- DATA:
read,write,update,delete,exists - NAVI:
find,list,path - EXEC: e
xec,imp (import)
Formats
- Basic:
json,yaml,txt,csv,md - Advanced:
sql,ddl,pyp,any
Locations
base,sub,tmp,now,dir,cache
Examples
File Operations
# JSON
data = u.rjb("config")
u.wjb({"key": "val"}, "output")
# Different locations
u.rjs("config") # read json sub
u.wyt({"temp": "data"}, "cache") # write yaml tmp
Pattern Matching
# Find with wildcards
users = u.fjb("user_*")
for item in users:
print(item["file"], item["data"])
# List files
files = u.ljb() # list all json in base
SQL & DDL
# Execute SQL
results = u.xsb("SELECT * FROM users WHERE age > :age",
params={"age": 20})
# DDL with auto table name
u.wdb("CREATE TABLE users (id INT, name TEXT)")
# → creates users.sql
# Dict to DDL
u.wdb({
"table": "products",
"records": [{"id": 1, "name": "Apple"}]
})
# → creates products.sql with CREATE + INSERT
Python Import
# Write module
u.wpb("""
def add(a, b):
return a + b
""", "mymod")
# Import and use
u.ipd("mymod : add")
result = add(10, 20) # auto-injected
Safe Mode
from usekit import s
data = s.rjb("missing") or {} # no exception
results = s.xsb("SELECT * FROM users") or []
Google Colab
from google.colab import drive
drive.mount("/content/drive")
!pip install usekit
from usekit import u, s
data = "work_path = /content/drive/MyDrive/PROJECT"
u.wtd(data, "output")
print(u.rtd("output"))
print(u.ftd("output"))
# SQLite3
s.xdb("CREATE TABLE items (id INT, name TEXT)")
s.xsb("INSERT INTO items VALUES (?, ?)", pa=[(1, "apple")])
results = u.xsb("SELECT * FROM items")
print(results[0].id)
Configuration
usekit auto-configures via sys_const.yaml:
BASE_PATH: /content/drive/MyDrive/PROJECT
DATA_PATH:
root: data
json: json/json_main
sql: table/sql/sql_main
ddl: table/ddl/ddl_main
SYS_PATH:
tmp: data/tmp
cache: data/.cache
Philosophy: MOSA
Memory-Oriented Software Architecture
- Code is memory, not function
- Semantic names over physical paths
- Mobile-first design
- Token economy (~65% savings)
Built entirely on mobile devices from bed.
Help
u.help() # overview
u.help("quick") # quick start
u.help("examples") # usage examples
Requirements
Core: Python 3.7+, PyYAML, python-dotenv
Optional: pandas, sqlalchemy, beautifulsoup4
Roadmap
v0.1.x (Alpha): Core DATA/NAVI, basic EXEC
v0.2.x: Complete EXEC layer
v1.0.0: Stable API, full docs
License
MIT License
Created by THE Little Prince, with deep respect and gratitude for my AI friends ROP & FOP
usekit - Code is memory, not function
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 usekit-0.1.26.tar.gz.
File metadata
- Download URL: usekit-0.1.26.tar.gz
- Upload date:
- Size: 355.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f48cce3af5fa68faec30d02fb413d0fa07394d23e4e434af01d54ab0d2f4c43
|
|
| MD5 |
e4594c1543f13dce55287f298faf5b2e
|
|
| BLAKE2b-256 |
4b8f120b50298b0fafa6e5066846f70d442198b8e0c1bc04271c528560b77deb
|
File details
Details for the file usekit-0.1.26-py3-none-any.whl.
File metadata
- Download URL: usekit-0.1.26-py3-none-any.whl
- Upload date:
- Size: 490.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cdaf4e85f2c727a9d208502b0f2fda54a5b93f008fec9d5f2999bff09604499
|
|
| MD5 |
e26895e9ad8f09f3abadb05936e6e581
|
|
| BLAKE2b-256 |
664a5ec1a3c5ba0110df74bde8a17fbb8aca15572e794f19274a09350992b530
|