Ananto30 Zero Versions Save

Zero: A simple and fast Python RPC framework

v0.5.0-beta

6 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/Ananto30/zero/compare/v0.4.0-beta...v0.5.0-beta

v0.4.0-beta

11 months ago

Msgspec as default serializer! :raised_hands:

Default serializer

Msgspec is the default serializer. So msgspec.Struct (for high performance) or dataclass or any supported types can be used easily to pass complex arguments, i.e.

from dataclasses import dataclass
from msgspec import Struct
from zero import ZeroServer

app = ZeroServer()

class Person(Struct):
    name: str
    age: int
    dob: datetime

@dataclass
class Order:
    id: int
    amount: float
    created_at: datetime

@app.register_rpc
def save_person(person: Person) -> None:
    # save person to db
    ...

@app.register_rpc
def save_order(order: Order) -> None:
    # save order to db
    ...

Return type

The return type of the RPC function can be any of the supported types. If return_type is set in the client call method, then the return type will be converted to that type.

@dataclass
class Order:
    id: int
    amount: float
    created_at: datetime

def get_order(id: str) -> Order:
    return zero_client.call("get_order", id, return_type=Order)

What's Changed

Full Changelog: https://github.com/Ananto30/zero/compare/v0.3.60-beta...v0.4.0-beta

v0.3.60-beta

1 year ago

Full Changelog: https://github.com/Ananto30/zero/compare/v0.3.6-beta...v0.3.60-beta

Fixed versioning 😓

v0.3.6-beta

1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/Ananto30/zero/compare/v0.3.51-beta...v0.3.6-beta

v0.3.51-beta

1 year ago

Now supports decorator to register rpc functions!

What's Changed

Full Changelog: https://github.com/Ananto30/zero/compare/v0.3.4-beta...v0.3.51-beta

v0.3.4-beta

1 year ago

v0.3.3-beta

1 year ago

Now supports Windows :raised_hands:

What's Changed

New Contributors

Full Changelog: https://github.com/Ananto30/zero/compare/v0.3.2-alpha...v0.3.3-beta

v0.3.2-alpha

2 years ago

Now supports Python 3.8! 🙌

v0.3.1-alpha

2 years ago
  • Fix client bug when the client is called from another ZeroServer.

v0.3.0-alpha

2 years ago

Breaking Changes

Clients are now separate for async and sync.

  • ZeroClient is regular sync client.
  • AsyncZeroClient is new async client.