Skip to main content

ValueObject Build Status

License: ISC - See LICENSE file

ValueObject is a dict-like object that exposes keys as attributes. You can use it like a regular dictionary (in fact, it is a subclass and does not override its __init__). You can use attribute or item access to get or set values.

>>> from valueobject import ValueObject
>>> vo = ValueObject(key=1)
>>> vo['key']
1
>>> vo.key
1
>>> vo['key'] += 1
>>> vo.key += 1
>>> vo['key']
3
>>> vo.key
3

Usability notes:

  • If you need to access a key that is not a valid Python identifier (for example, it includes spaces), use regular dict access.
  • All regular object, dict and ValueObject methods will be returned on attribute access. A key such as copy needs to be accessed via item access syntax (e.g. valueobject['copy']).

Changelog

  • 1.0.3: Minor build fixes, to make the setup.py file python3 safe. While the rest of the library was python3 safe all along, that file was not… 😬

Release files for valueobject 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for valueobject 1.0.3
File Size Uploaded
valueobject-1.0.3.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for valueobject 1.0.3
File Interpreter ABI Platform
valueobject-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / valueobject-1.0.3.tar.gz

Download URL valueobject-1.0.3.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0db56028ee8da2349f888cfed844053b0c835d2675a76f1beb41791afd81cad0
BLAKE2b-256 checksum
How to use checksums
06a098994e07f18097d10eeb03c156bb79e8568dce2fc434a08037856ab1b904
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Release files / valueobject-1.0.3-py3-none-any.whl

Download URL valueobject-1.0.3-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1ec4a925e24afc6850008ef13d953c8dbf0595b6962e597657e98152aff8bc6
BLAKE2b-256 checksum
How to use checksums
1a673db084eaf286b3f7e2d3b34872aad305c72b987ffa18cb1a03e431855d2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page