Skip to main content

Webezy.io CLI for generating gRPC micro-services

Project description

webezy

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 opensource project by google.

Get full explanation and many more details on usage at webezy.io.

Installation

Install from pip

pip install webezyio

Sub-modules

  • builder - A command-pattern module for easy interacting with webezy.json
  • cli - A CLI interface module for webezy
  • coder - A pluggable API for all code generating methods
  • commons - Common modules and methods, such as retrieving and modifying protos

Project Structure

Every webezy.io project should look like the following schema:

Note: For simplicity we use for this example 1 service (SampleService) and 1 package (SamplePackage)

# Root dir of your project
my-project/
├─ bin/ # Some executable scripts
├─ clients/ # All clients code in multiple languages if specified  ├─ python/
│     ├─ client.py
├─ server/ # Server file  ├─ server.py
├─ protos/ # Proto defintions files  ├─ SampleService.proto
│  ├─ Samplepackage.proto
├─ service/ # Service file and protos compiled files  ├─ protos/
│    ├─ SampleService_pb2.py
│    ├─ SampleService_pb2_grpc.py
│    ├─ SamplePackage_pb2.py
│    ├─ SamplePackage_pb2_grpc.py
│  ├─ SampleService.py
├─ .gitignore
├─ README.md

Docs

Go to Webezy.io Docs for full explanation.

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>

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 and new can be shortend with the first letter e.g : wz g p is equivalent to wz 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
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 to webezy 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 with wz

Dev-docs

You can build the auto generated docs from the webezyio modules. It will generate module and function documnetations based on DocsString written on code.

cd ./docs && make html

Open ./docs/build/html/index.html in a browser.

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

webezyio-0.0.2.tar.gz (59.1 kB view hashes)

Uploaded Source

Built Distribution

webezyio-0.0.2-py3-none-any.whl (75.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page