Skip to main content

make iter object easy to access (item to attr)

Project description

Oba

PyPI GitHub

Usage

  • Convert iterative object to attribute-accessible object

Install

pip install oba

Description

from oba import Obj

o = Obj(dict(a=[1, 2, 3], b=[4, dict(x=1)], c=dict(l='hello')))

print(o.a[2])  # => 3
print(o.c.l)  # => hello

o.b[1].x = 4
print(Obj.raw(o.b[1]))  # => {'x': 4}

print(bool(o.xxx))  # => False, accessible as NoneObj()

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

oba-0.0.8.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file oba-0.0.8.tar.gz.

File metadata

  • Download URL: oba-0.0.8.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for oba-0.0.8.tar.gz
Algorithm Hash digest
SHA256 3058117313d961db91ebb133f3dc3340ef59ea7785a58362cc6572087ddc7572
MD5 4b409b220592ac581ca39ea6db273e5d
BLAKE2b-256 b1d69f309216033edbad18c9d7ef34e5a5b4e3dfac73408aadf5edff09a32f7d

See more details on using hashes here.

Supported by

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