Skip to main content

sylk CLI build, deploy and manage gRPC microservices.

Project description

sylk.build CLI

Sylk Logo Sylk Downloads Python 3.7+

sylk 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.

sylk.build 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 Stable
NodeJS -- V Stable
C#.NET X X Planned

Get full explanation and many more details on usage at sylk.build.

The sylk CLI is a wrapper for SylkArchitect class which does mainly the processing and execution of creating sylk.jso file.

You can interact with the SylkArchitect 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 sylk works.

Installation

Install from pip

pip install sylk

Docs

Go to sylk.build 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 sylk.build project
  • Templating As a sylk.build 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 sylk.build workspace

Tutorials:

Quick Start

Note Please refer to CLI docs for any question you got, also make sute to use the CLI help sylk --help should give you an additional information on every command you may possibly run

To create a new sylk.build project run the following command:

sylk 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)

sylk n <YourProject> --template @sylk/TodoAppPy

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 sylk.build 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 : sylk g p is equivalent to sylk generate package

# Generate new package to hold messages
sylk generate package
# Generate new service to hold RPC's (Methods)
sylk generate service
# Generate message under specified package
sylk generate message
# Generate RPC (Method) under specified service
# Same as running `sylk g r`
sylk 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
sylk build
# Then run the server
sylk run 

Note you can auto-build your resources if applicable straight when you are generating them with adding --build argument to sylk 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 sylk with sylk

CLI Usage

Get to know the commands supported by sylk.build CLI and start to use their powers ! All listed commands can be found here: sylk.build CLI API

The sylk 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 sylk.build CLI command can be called with the abbreviated sylk

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 sylk --loglevel DEBUG <sub-command>

Development

We are welcoming any code contribution and help to maintain and release new fetures as well documenting the library.


Created with love by Sylk team. 2023 © Sylk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

sylk-0.0.5-py3-none-any.whl (331.5 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