Webezy.io CLI for generating gRPC micro-services
Project description
webezy.io (webezyio)
webezyio is free and open-source project that aims to be a complete framework for developing micro-services projects.
The underlying communication protocol is HTTP2
and for serialization and deserialization is protobuf
.
It utulize those communication protocol, message serialization / deserialization and code generator with gRPC
open-source project by google.
Webezy.io has been created to give devlopers quick and structerd way for building gRPC services without pain while keeping thins open for further modifications.
In result we are trying not to restrict the implemantations themselves but instead applying small restrictions on the project structure for well defined, re-usable structure that can be used by many languages and scenarios.
The current supported languages are:
Language | Server | Client | Status |
---|---|---|---|
Python | V | V | Stable |
Typescript | V | V | Stable |
Go | V | V | Experimental |
Webpack-js | -- | V | Experimental |
C#.NET | X | X | Planned |
Get full explanation and many more details on usage at webezy.io
.
The webezyio CLI
is a wrapper for WebezyArchitect class which does mainly the processing and execution of creating webezy.jso file.
You can interact with the WebezyArchitect class with two main ways:
- CLI - The most common and easy to get you started creating gRPC services.
- Python API - Will be useful for more compehransive project creation flows and for developers who wants to understand how webezyio works.
Installation
Install from pip
pip install webezyio
Docs
Go to Webezy.io Docs for full explanation.
Useful Resources:
Features:
- CLI Well structerd CLI wrapper to create, edit, run and debug a RPC call to gRPC services
- Generated Code Auto-Generated code classes for Services implemantations and client stubs
- Plugins Highly pluggable API allow us to create and publish "Extensions" without breaking the code:
- Readme generator
- Languages Builder - (Python, Typescript & Go)
- Proto Builder
- Dockerize (In-development)
- Migrate gRPC services to Webezy.io project
- Templating As a Webezy.io project grows you can template it and share it to your peers for remote work (Branching) or as a 'Built-in' template to be used by other co-workers
- Unified Extensions We have been working on unification process of
Protobuf
Extensions (Calles Custom Options) which will allow us in the future to release more pluggable features directly into your Webezy.io workspace
Tutorials:
Quick Start
Note Please refer to CLI docs for any question you got, also make sute to use the CLI help
webezy --help
should give you an additional information on every command you may possibly run
To create a new webezy.io project run the following command:
webezy new <YourProject>
Note you can create a new project based on template to get started quickly Sample Python server (Clients are available both in TS + PY)
wz n <YourProject> --template @webezyio/SamplePy
Or the same resources just for Typescript server
wz n <YourProject> --template @webezyio/SampleTs
- For more information see Project Templating
Then you will need to navigate into your project
Note if you didnt specified the
--path
argument when creating new project by default it will create a project under your current directory
cd <YourProject>
After you are under the new project directory you can go ahead and create webezy.io resources with those simple commands:
Note Please note that every sub-command of
generate
andnew
can be shortend with the first letter e.g :wz g p
is equivalent towz generate package
# Generate new package to hold messages
webezy generate package
# Generate new service to hold RPC's (Methods)
webezy generate service
# Generate message under specified package
webezy generate message
# Generate RPC (Method) under specified service
# Same as running `wz g r`
webezy generate rpc
Note Make sure before creating new RPC on service that you have imported at least 1 package to be used by the service. for more information visit -> Package Docs
After you had generated your resources for the project and modified the code (See the docs for more explanation on how to develop your project and make changes Sample Project).
You can now build your project and run your server with those simple commands:
# First build your project
webezy build
# Then run the server
webezy run
Note you can auto-build your resources if applicable straight when you are generating them with adding
--build
argument towebezy generate
comands.
You can use now your client code that has been autogenerated in your specified language(s) on creating the project.
Pro-Tip: you can always make your commands even shorter with replacing
webezy
withwz
CLI Usage
Get to know the commands supported by Webezy.io CLI and start to use their powers ! All listed commands can be found here: Webezy.io CLI API
The webezyio CLI module is essantially a wrapper to the Architect API
which is just to construct a well defined resource metadata which later on can be used by the Builder API
to build all resources files (Code files & .proto files)
Note Each webezy.io CLI command can be called with the abbreviated
wz
Note The CLI has verbose logging system that can be changed accoriding to your needs. we do recommand to keep it to ERROR as default to not overload you with multiple lines for each command - to change the default behaviour run your commands with
wz --loglevel DEBUG <sub-command>
Advanced Usage
There are more advanced use cases for Webezy.io which will probably will require some time to get used to Webezy.io structure and concepts to really have a useful and meaningful interaction.
We do recommend to go over Webezy.io Concepts before trying some advanced usage
Some of the features are listed below:
- Templating - Wrap your project and re-share them among team members or to your won base project templates into other future or existing Webezy.io projects.
- Custom Configurations - Learn how to define custom configurations for a project to make your life easier.
- Migration - You can now migrate your existing gRPC project to unified structure and resources of Webezy.io projects.
- Extending Protobuf Functionality - You can configure a custom extension for your resources.
Batteries Included
Webezy.io goal is to make development lifecycles quick and meaningfull while coding a distrubted-system using state of the art technologies.
Some built-ins features are provided so you can jump-start your development right away:
Development
We are welcoming any code contribution and help to maintain and release new fetures as well documenting the library.
See our contirbution page
Created with love by Amit Shmulevitch. 2022 © webezy.io
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file webezyio-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: webezyio-0.1.9-py3-none-any.whl
- Upload date:
- Size: 319.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48408e006b66903b727d1437b40dbe1c301d1a4cff487490defd11cc3199317f |
|
MD5 | 2d9ef988fa2e055fff1947a2b67170f7 |
|
BLAKE2b-256 | 0738375e569c45c80ce8e6852e3791d965890c82eff421d00d2897e18f444448 |