Skip to main content

A collection of Value Objects to save time by generalizing data type and format validations.

Project description

Python Value-Objects

GitHub Pypi Downloads GA

A collection of Value Objects to save time by generalizing types and format validations.

Value-objects

Numeric value-objects

Int

Integer numbers without a fractional component that don't support decimal points.

from pyvalueobjects import Int

# Creation
my_integer = Int(9)

# Getting raw value
my_integer.value() # returns -> 9

Nullable Int

Integer numbers and None.

from pyvalueobjects import NullableInt

# Creation
my_integer = NullableInt(9)

# Creating from None
my_nullable_integer = NullableInt(None)

# Getting raw value
my_integer.value() # returns -> 9
my_nullable_integer.value() # returns -> None

String value-objects

String

from pyvalueobjects import String

# Creation
my_str = String('potato')

# Getting raw value
my_str.value() # returns -> 'potato'

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

pyvalueobjects-0.11.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

pyvalueobjects-0.11.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file pyvalueobjects-0.11.0.tar.gz.

File metadata

  • Download URL: pyvalueobjects-0.11.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for pyvalueobjects-0.11.0.tar.gz
Algorithm Hash digest
SHA256 bf59459fb3fd433fd1d8ca75b969a7b517b5e9050c508fff74007735072ab32d
MD5 1af30f865439931abefeffd5c1e204e2
BLAKE2b-256 885de440fbe67f1d223a5d45abc67da436ba53ec5c4a7696c52769ab57928c75

See more details on using hashes here.

File details

Details for the file pyvalueobjects-0.11.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyvalueobjects-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7ef5e74b8ce1a38ea7baa8d910786f3d2b291a31172748f7a682c2e2036fe8d
MD5 69507d9987da2b281e189ecde28030ad
BLAKE2b-256 655b72b8cb025ce116b8de905437cbd2b3a08f18526a1dc22125d38346cc5a0c

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