• Stars
    star
    712
  • Rank 63,153 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 4 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Yet another serialization library on top of dataclasses, inspired by serde-rs.

pyserde

Yet another serialization library on top of dataclasses, inspired by serde-rs.

pypi pypi GithubActions CodeCov

Guide | API Docs | Examples

Overview

Declare a class with pyserde's @serde decorator.

@serde
@dataclass
class Foo:
    i: int
    s: str
    f: float
    b: bool

You can serialize Foo object into JSON.

>>> to_json(Foo(i=10, s='foo', f=100.0, b=True))
'{"i":10,"s":"foo","f":100.0,"b":true}'

You can deserialize JSON into Foo object.

>>> from_json(Foo, '{"i": 10, "s": "foo", "f": 100.0, "b": true}')
Foo(i=10, s='foo', f=100.0, b=True)

Features

Contributors โœจ

Thanks goes to these wonderful people (emoji key):

yukinarit
yukinarit

๐Ÿ’ป
Alexander Miskaryan
Alexander Miskaryan

๐Ÿ’ป
ydylla
ydylla

๐Ÿ’ป
Kevin Squire
Kevin Squire

๐Ÿ’ป ๐Ÿ“–
Yushi OMOTE
Yushi OMOTE

๐Ÿ’ป
Yuji Kanagawa
Yuji Kanagawa

๐Ÿ’ป
Weiliang Li
Weiliang Li

๐Ÿ’ป
Mauve
Mauve

๐Ÿ’ป
adsharma
adsharma

๐Ÿ’ป
Guilhem C.
Guilhem C.

๐Ÿ“–
Pierre Tardy
Pierre Tardy

๐Ÿ’ป
Raphael Nestler
Raphael Nestler

๐Ÿ“–
Pranav V P
Pranav V P

๐Ÿ’ป
andreymal
andreymal

๐Ÿ’ป
Johann Fuechsl
Johann Fuechsl

๐Ÿ’ป
DoeringChristian
DoeringChristian

๐Ÿ’ป
Stuart Axelbrooke
Stuart Axelbrooke

๐Ÿ’ป
Jakub Berรกnek
Jakub Berรกnek

๐Ÿ’ป
Fredrik Reinholdsen
Fredrik Reinholdsen

๐Ÿ’ป
Bruno Oliveira
Bruno Oliveira

๐Ÿ“–
Kyle Kosic
Kyle Kosic

๐Ÿ’ป
Gajo Petrovic
Gajo Petrovic

๐Ÿ“–
m472
m472

๐Ÿ’ป
Add your contributions

This project follows the all-contributors specification. Contributions of any kind welcome!

LICENSE

This project is licensed under the MIT license.

More Repositories

1

mapbox-gl-rs

Unofficial Rust/WASM binding for mapbox-gl-js
Rust
37
star
2

envclasses

envclasses is a library to map fields on dataclass object to environment variables.
Python
31
star
3

apnggif

Python interface to apng2gif.
C
14
star
4

rocket-webapi

Making JSON webapi server with Rust and Rocket ๐Ÿš€
Rust
11
star
5

WebSocketSample

2016ๅนดๅบฆ HALๅฐ‚็ง‘็”จWebSocketSample.
C#
9
star
6

python-cookbook-in-modern-cpp

Writing python cookbook in Modern C++ (C++17)
Python
8
star
7

chip8

๐Ÿ‘พ Chip8 emulator written in Rust
Rust
8
star
8

cowgod-chip8-tech-reference-ja

Cowgod's Chip-8 Technical Reference v1.0ๆ—ฅๆœฌ่ชž่จณ
7
star
9

ebiten8

A CHIP-8 emulator written with Go and Ebiten.
Go
6
star
10

flappy_alien

Making a flappy bird like casual game with Pythonista and Python3 ๐Ÿ‘ฝ
Python
5
star
11

oppapi

Ergonomic option parser on top of dataclasses, inspired by structopt.
Python
4
star
12

strtobool

distutils.utils.strtobool. Because latest virtualenv doesn't ship distutils anymore.
Python
4
star
13

parrotify

Parrotify is a google chrome extension to allow custom GIF emoji displayed in your browser :thumbsupparrot:
JavaScript
4
star
14

nomad_api

(WIP) A Hashicorp Nomad API client written in modern Python.
Python
3
star
15

flappy_ferris

๐Ÿฆ€ Cross platform flappy bird like game in Rust.
Rust
2
star
16

okome

dataclass comment parser ๐Ÿš
Python
2
star
17

zenn

My Zenn contents
1
star
18

cagario

Python
1
star
19

flipper

Experimenting bot interface to Mecab.
Python
1
star
20

py-tetris

๐ŸŽฎ
Python
1
star
21

chat

Chat server written to learn Tokio/Futures.
Rust
1
star
22

gpsdistance

C++
1
star
23

rust-k8s-grpc-metrics-example

Visualize metrics of Rust gRPC service on Kubernetes
Rust
1
star
24

pythonista-invaders

WIP: Making Space Invaders only with iPad ๐Ÿ‘พ
Python
1
star
25

ziploc

A missing offline python dependency archiver.
Python
1
star