Skip to main content
Logo

python options to not use external modules

March 29, 2026
1 min read

Collecting some options howto run without having to use virtual env installs. This is very limited but in some cases it helps me where I do not want to depend on pip or uv.

.ini and confirparser
urllib.request

$ cat /tmp/test1.json
[
{"name": "city", "#text": "City"},
{"name": "phone", "#text": "Phone"},
{"name": "address", "#text": "Address"}
]
$ cat /tmp/test1.ini
[prod]
url = google.com
$ cat /tmp/test1.py
import configparser
import json
#import urllib.request
from urllib.request import urlopen
config = configparser.ConfigParser()
config.read("/tmp/test1.ini")
print(config.sections())
print(config["prod"]["url"])
with open('/tmp/test1.json') as f:
d = json.load(f)
print(d)
with urlopen(f'https://jsonplaceholder.typicode.com/posts/1') as response:
print (json.loads(response.read()))