• Stars
    star
    712
  • Rank 63,595 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 2 months 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
39
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