Giter Club home page Giter Club logo

capnp-stub-generator's Introduction

Stub-file generator for cap'n proto schemas

Generates Python stubs files from cap'n proto schemas. Useful for IDE auto-completion and static type checking.

Usage

Clone and install with pip:

pip install capnp-stub-generator

Run on a set of files:

capnp-stub-generator -p "path/to/capnp/schemas/**/*.capnp" \
    -c "path/to/output/directory/**/*_capnp.py" "path/to/output/directory/**/*_capnp.pyi" \
    -e "**/c-capnproto/**/*.capnp" \
    -r

where the options are

  • -p - search paths that contain schema files
  • -c - cleanup paths (delete matching files before generation)
  • -e - exclude paths that shall not be converted to stubs
  • -r - recursive file search

Currently, stub files are always created adjacent to schema files.

For a runnable example, see the test generation script.

Style and packaging

This repository is a fork from a company-internal repository. Issues can be reported here, will be fixed upstream, and backported. Therefore, this repository does not (yet) contain a style checking and packaging pipeline.

The repository may become independent in the future.

capnp-stub-generator's People

Contributors

nworb-cire avatar adeebshihadeh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.