Skip to main content

Safe JSON serializer for complex Python objects (Pydantic, Pandas, NumPy, etc.)

Project description

🧼 cleanslay

cleanslay is a Python library that safely sanitizes complex objects into JSON-serializable structures.

It handles:

  • Built-in types: str, int, float, bool, None
  • Collections: dict, list, tuple, set
  • Special types: datetime, date, UUID, Decimal
  • Libraries:
    • ✅ Pydantic models
    • ✅ Dataclasses
    • ✅ NumPy arrays and scalars
    • ✅ Pandas Series and DataFrames
  • Fallback for custom classes

🔧 Installation

pip install cleanslay

For development

poetry install --extras "test"
or
pip3 install ".[test]"

For testing

pytest tests --tb=short --disable-warnings

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

cleanslay-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

cleanslay-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file cleanslay-0.1.0.tar.gz.

File metadata

  • Download URL: cleanslay-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cleanslay-0.1.0.tar.gz
Algorithm Hash digest
SHA256 340dda55ef5626adc2f7cba836dd5f7b9f21f1b5b562386d4dc6d5ebca3a2d04
MD5 29bece6c09b9c7ded1d5c5df7c6d6c42
BLAKE2b-256 091fb4c6702634d1d2896ae080d93812f28159ff0d3e214bc6ecebb1f507cc20

See more details on using hashes here.

Provenance

The following attestation bundles were made for cleanslay-0.1.0.tar.gz:

Publisher: publish.yaml on grakn/cleanslay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cleanslay-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cleanslay-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cleanslay-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf1e037aa102afab26384e380709aa91a696e29e3d1a9ab51b0178489ff7d278
MD5 e721d5a637691c857e3a9cbb853b75b5
BLAKE2b-256 f56a7d35aa6cf144d1683b38e4b2f5f8df45bdeb112beb21182c2acafd24cb19

See more details on using hashes here.

Provenance

The following attestation bundles were made for cleanslay-0.1.0-py3-none-any.whl:

Publisher: publish.yaml on grakn/cleanslay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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