Python common task, general purpose library (serialization, networking, etc.).
Project description
iogp
Python common task, general purpose library (serialization, networking, etc.). Note: this project used to be called iolib - it was renamed for PyPI.
iogp.net
- provides the
download()function- automatic caching of downloads
- supports cookies, authentication, etc.
- can spoof user agents (or the entire GET request) - see the
USER_AGENTSdict innet/net.py - examples:
text = iogp.net.download('https://google.com')info = {}; iogp.net.download('https://1.1.1.1', info=info, cache=0)=>info['code'] == 200,info['headers']['Content-Type'], etc.
iogp.db
- provides a persistence / caching / storage object
DataCachethat can store e.g. the results from a downloaded URL-
use
DataStoreto also get in-memory caching of values -
ObjCache()wrapsDataCacheto generate the storage filename automatically -
usage:
from iogp.db import DataCache fn = 'objects.db' db = DataCache(fn) db['key1'] = {'some':['serializable', 'object', 0]} db['some-other-key'] = 0 db.close() db = DataCache(fn) print(db['key1']) print('key2' in db, 'some-other-key' in db)
-
iogp.win
-
ctypes wrapper over some Windows-specific functions
-
example - iterating all windows and retrieving the window title for each one:
import iogp.win as win def callback(hwnd, lparam): size = 512 buf = win.unicode_buffer(size) win.GetWindowText(hwnd, buf, size) print(f'[-] Handle: {hwnd}, title: {buf.value}') return 1 # 0 to stop win.EnumWindows(win.WNDENUMPROC(callback), 0)
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 iogp-1.0.4.tar.gz.
File metadata
- Download URL: iogp-1.0.4.tar.gz
- Upload date:
- Size: 53.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a55f9b0212ab3ba3e93c12751b368989a1ca02831a76b9d90e8db2c95928816
|
|
| MD5 |
44b7a0ccfd0ec04c54866090f4a4a0c5
|
|
| BLAKE2b-256 |
9655ec9a5518be1f0c6f5053c48e1e3f1571d75e3a620ddb5a5365aefee3921b
|
File details
Details for the file iogp-1.0.4-py3-none-any.whl.
File metadata
- Download URL: iogp-1.0.4-py3-none-any.whl
- Upload date:
- Size: 60.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf3ac2549b68cf3e71cd402aee09f4a004e20a75e41163e0e0b8870875d4c714
|
|
| MD5 |
4becb2e26ba7dac205f9869f45784232
|
|
| BLAKE2b-256 |
4cc32bd2ac25c8f15769c7340d640aa65f62d4149a65005f35fd5a8e3fd3cf60
|