Skip to main content

pyserde extension for (de)serializing zoneinfo.ZoneInfo

Project description

pyserde extension for zoneinfo.ZoneInfo.

import serde_timedelta
from serde import serde
from serde.json import to_json, from_json
from zoneinfo import ZoneInfo

# Initialize serde_zoneinfo extension.
serde_zoneinfo.init()


@serde
class Foo:
    a: ZoneInfo


f = Foo(ZoneInfo("America/New_York"))
json = to_json(f)
print(json)                  # Prints '{"a": "America/New_York"}'
print(from_json(Foo, json))  # Prints Foo(a=ZoneInfo(key='America/New_York'))

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

pyserde_zoneinfo-0.0.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

pyserde_zoneinfo-0.0.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file pyserde_zoneinfo-0.0.1.tar.gz.

File metadata

  • Download URL: pyserde_zoneinfo-0.0.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pyserde_zoneinfo-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e76b0b4baf0e54382997b500d9f787bf41d7c6bc1551447ef6d0e7fc85eb987d
MD5 1f4b398c06196e81199963cd025629bf
BLAKE2b-256 246bfaa7f135c473c60f562f7507db364cd8d5cb0283d6d6d59f175d2d1dec87

See more details on using hashes here.

File details

Details for the file pyserde_zoneinfo-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyserde_zoneinfo-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5db8ad44230b7381893ab47f22c50e714a9dc7056094cfd2bfe3c4c1d293295b
MD5 3e6480fc25f2d6e3854477e91f5da077
BLAKE2b-256 45203af906a366c6e5edcae0b90c90b7bff74f8ef249ab42de8f155f2bede6c2

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