Skip to main content

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_AGENTS dict in net/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 DataCache that can store e.g. the results from a downloaded URL
    • use DataStore to also get in-memory caching of values

    • ObjCache() wraps DataCache to 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iogp-1.0.6.tar.gz (54.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iogp-1.0.6-py3-none-any.whl (62.0 kB view details)

Uploaded Python 3

File details

Details for the file iogp-1.0.6.tar.gz.

File metadata

  • Download URL: iogp-1.0.6.tar.gz
  • Upload date:
  • Size: 54.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for iogp-1.0.6.tar.gz
Algorithm Hash digest
SHA256 0874f42c302d1de9086b0f1e6927f502c0e09fac4ad2a584c3a2f8e91d8b109f
MD5 180f4b36ac91d32fd31b99e813d05a1c
BLAKE2b-256 489f6a38535987b0d870799feb3f4045f4d2d0e97198580bdd7804b0ecc11e6f

See more details on using hashes here.

File details

Details for the file iogp-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: iogp-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 62.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for iogp-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4aa9d4ab20d71e3d8a4db250873eb5fa7583cddb0751cf8f8723319be8cc3a02
MD5 326265ab5b59e1e0fadefe362ae0a7d1
BLAKE2b-256 e03ff1c0534ddb7b2abe39c5acc7b9f217a2230e5bae9bc088866805dbc9d486

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page