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.12.0.tar.gz (5.1 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.12.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyvalueobjects-0.12.0.tar.gz
Algorithm Hash digest
SHA256 7ded63eaf8a28273ecf1360679c01e35a9550fb592ab0f304aa735f3fcd2e960
MD5 18d528b21817e5be0c93c9de09adfe4f
BLAKE2b-256 39fc402f6c76bacd5a5f462c8d863078f9be4b329ef2613294b38002d9a6f777

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyvalueobjects-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc17d126a371e12031ff4117570a6befa518ba09d879cd3a6d38e6ad515e46b8
MD5 a994b4304601080d8a01b241a269b98d
BLAKE2b-256 54329414cfb7dcd658007dcbd0c64d24bf418a7c14d0e295a53007089f70780a

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