Saravanan666/pypi-org huggingface dataset:
Package: protobuf-distutils
Python setuptools extensionThis is an extension for Python setuptools which uses an installed protobuf
compiler (protoc) to generate Python sources.InstallingTo use this extension, it needs to be installed so it can be imported by other
projects' setup.py.$pythonsetup.pybuild
$python-mpipinstall.(If you want to test changes to the extension, you can usepython setup.py develop.)UsageExample setup.py configurationfromsetuptoolsimportsetupsetup(# ...name='example_project',# Require this package, but only for setup (not installation):setup_requires=['protobuf_distutils'],options={# See below for details.'generate_py_protobufs':{'source_dir':'path/to/protos','extra_proto_paths':['path/to/other/project/protos'],'output_dir':'path/to/project/sources',# default '.''proto_files':['relative/path/to/just_this_file.proto'],'protoc':'path/to/protoc.exe',},},)Example build invocationThese steps will generate protobuf sources so they are included when building
and installingexample_project(see above):$pythonsetup.pygenerate_py_protobufs
$pythonsetup.pybuild
$python-mpipinstall.Optionssource_dir:This is the directory holding .proto files to be processed.The default behavior is to generate sources for all .proto files found undersource_dir, recursively. This behavior can be controlled with options below.proto_root_path:This is the root path for resolving imports in source .proto files.The default is the shortest prefix ofsource_diramong[source_dir] + self.extra_proto_paths.extra_proto_paths:Specifies additional paths that should be used to find imports, in
addition tosource_dir.This option can be used to specify the path to other protobuf sources,
which are imported by files undersource_dir.  No Python code will
be generated for .proto files underextra_proto_paths.output_dir:Specifies where generated code should be placed.Typically, this should be the root package that generated Python modules
should be below.The generated files will be placed underoutput_diraccording to the
relative source paths underproto_root_path. For example, the source file${proto_root_path}/subdir/message.protowill be generated as the Python
module${output_dir}/subdir/message_pb2.py.proto_files:A list of strings, specific .proto file paths for generating code, instead of
searching for all .proto files undersource_path.These paths are relative tosource_dir. For example, to generate code
for just${source_dir}/subdir/message.proto, specify['subdir/message.proto'].protoc:By default, the protoc binary (the Protobuf compiler) is found by
searching the environment path. To use a specific protoc binary, its
path can be specified.
Package: protobuf-extra
protobuf-extra provides a program and a library to convert between
ASCII, Python dictionary, and binary Protocol Buffer message
representations.Download:https://pypi.python.org/pypi/protobuf-extraSource code:https://github.com/vmj/protobuf_extraBuild status:https://travis-ci.org/vmj/protobuf_extraContentsBasic usageRequirementsInstallationAuthorsLicenseRelease historyVersion 0.5.2 (2017-11-10)Version 0.5.1 (2017-08-15)Version 0.5 (2017-08-15)Version 0.1 (2013-10-08)Basic usageTypical usage of the program might look like this:$ export PYTHONPATH=.
$ pb --type test.Person.Person >person-template.txtThe ‘PYTHONPATH’ should contain the path to the Python protobuf message definitions,
those generated by the ‘protoc’ protobuf compiler.Now edit theperson-template.txt.Then generate protobuf message from it:$ pb --type test.Person.Person --in ascii --out bin >person.gpb <person-template.txt
$ pb --type test.Person.Person --in bin --out dict <person.gpb
{'age': 39, 'birthday': {'month': 8, 'day': 4, 'year': 1978}, 'name': u'Mikko', 'children': [{'age': 4, 'birthday': {'month': 3, 'day': 18, 'year': 2013}, 'name': u'Sonja'}]}
$ pb --type test.Person.Person --in bin --out ascii <person.gpb
name: "Mikko"
age: 39
birthday {
  year: 1978
  month: 8
  day: 4
}
children {
  name: "Sonja"
  age: 4
  birthday {
    year: 2013
    month: 3
    day: 18
  }
}See ‘pb –help’ for a complete listing of options.The included Python library provides the ability to make, for example,
protobuf Message instances from a Python dictionary:#!/usr/bin/env python
from test.Person_pb2 import Person
from protobuf_extra import MessageFromDictionary

person = MessageFromDictionary(Person, {
    "name": "John Doe",
    "birthday": {"year": 1970, "month": 1, "day": 1}
})See ‘pydoc protobuf_extra’ for a lot more documentation.RequirementsIn addition to Python (2.7 or 3.3 - 3.6),protobuf(3.0.0 - 3.3.0) is required.InstallationUse eitherpip installprotobut-extraor download the source
archive and usepython setup.py install.The source code is available atPython Package Index (PyPI)or, if you want the
unreleased version, fromGithubgit repository.AuthorsOriginal author and current maintainer is Mikko Värri
(vmj@linuxbox.fi).Licenseprotobuf-extra is Free Software, licensed under GNU General Public
License (GPL), version 3 or later.  See LICENSE.txt file for details.Release historyVersion 0.5.2 (2017-11-10)A source distribution packaging bug was fixed.Version 0.5.1 (2017-08-15)This release fixes a few places in docs.Version 0.5 (2017-08-15)Ported to Python 3, still compatible with Python 2.7.  Python 3 support requires protobuf 3.0.0 or newer.This version still only supports ‘proto2’ syntax.Version 0.1 (2013-10-08)Initial release.
Package: protobufferize
protobufferizeA simple setuptools plugin to compile proto files at build time.InstallationInstall from PyPI:pip3 install protobufferizeConfigurationAvailable configuration parameters:clearOutputDirectory[default: false]grpcOutputDirectory[default: None]outputDirectory[default: ./output]protoSourceRoot[default: ./protos]protoVersion[default: 3.10.1]XML configuration example:<ProtobufferizeConfiguration><clearOutputDirectory>false</clearOutputDirectory><grpcOutputDirectory>test_data/grpc_output</grpcOutputDirectory><outputDirectory>test_data/output</outputDirectory><protoSourceRoot>test_data/protos</protoSourceRoot><protoVersion>3.10.1</protoVersion></ProtobufferizeConfiguration>A xml configuration file namedprotobufferize.xmlshould be put in the python's project root folder.
In alternative, the configuration file's path can be specified in the environment variableprotobufferize_conf.UsageCompile every.protofile inprotoSourceRootsubdirectories and output in the specifiedoutputDirectory(outputDirectorygets emptied beforewards ifclearOutputDirectoryset totrue).python3setup.pyprotobufferizeInternal detailsBy default, the specified version ofprotocbinary is downloaded and executed to compile the profo files.IfgrpcOutputDirectoryis set - instead - the latestgrpc-toolspypi package is used (and theprotocversion is ignored for compatibility problems).
Package: protobuf-gen
MotivationThis is a library to generate type-hinted protocol buffer bindings. This tool solves two main issues with the original
Google cproto compiler python output:cproto does not support exporting the code with the package roots that are different from what had been supplied
by the original .proto file authors, therefore expecting the protocol users to sed through the code (see issues881and1491).It builds the interfaces at run time, therefore disallowing one from using the static type checkers and disabling
the auto-complete in your favourite IDE.ExampleThis example is usable for building a fully-functional etcd3 client in python. Otherwise seetests.Let’s start by cloning the repositories containing the necessary .proto files to be compiled. Etcd3 references files
from several protobuf libraries, so we are going to need all of them.mkdirpb-includes# etcd references it's own .proto files against the root of their own repository, so the doubling here is intendedgitclonehttps://github.com/coreos/etcd.git./pb-includes/etcd/etcdgitclonehttps://github.com/grpc-ecosystem/grpc-gateway.git./pb-includes/grpc-gatewaygitclonehttps://github.com/gogo/protobuf.git./pb-includes/protobufNow, let’s actually generate the files.fromprotobuf_genimportremap,wrap# all of the _pb2 modules will now be importable through `etcd3py.pb_mods.*`# for example a module "google/api/http.proto" will be available as "etcd3py.pb_mods.google.api.http_pb2"remap(# the working directory is given as the parent directory of the package folder (etcd3py in this case).'.','etcd3py.pb_mods,# .proto include directories['./pb-includes/grpc-gateway/third_party/googleapis','./pb-includes/etcd','./pb-includes/protobuf',],# .proto files to be included in the distribution['etcd/etcdserver/etcdserverpb/rpc.proto','etcd/mvcc/mvccpb/kv.proto','etcd/auth/authpb/auth.proto','google/api/annotations.proto','gogoproto/gogo.proto','google/api/http.proto',])AuthorAndrey Cizov (acizov@gmail.com), 2018
Package: protobuf-grpc-distutils
protobuf_grpc_distutilsThis package enables gRPC protobuf definitions to be installed viapip install.  This project takes
inspiration fromprotobuf-distutilsandprotobuf-custom-build.BackgroundWhen trying to package the auto-generated protobuf Python files, you quickly run into anissueregarding how the Python modules are imported.  There are various ways to work around the issue as detailed in that thread.  This package assumes that the
proto files are structured in a hierarchy that directly maps to your required Python package hierarchy.  See the example below.UsageIn order to use this package, it must be added to the build requirements of your target Python package.  A custom build step can then be added
to auto-generate the protobuf and gRPC Python modules when youpip installyour package.The difference to theprotobuf-distutilspackage is that instead of looking for theprotoccompiler, it depends on thegrpcio-toolspackage which providesgrpc_tools.protoc.  Otherwise, the same options are passed to thegenerate_grpc_py_protobufsmethod in yoursetup.py.from setuptools import setup
setup(
    # ...
    name='example_project',

    # Require this package, but only for setup (not installation):
    setup_requires=['protobuf_grpc_distutils'],

    options={
        # See below for details.
        'generate_grpc_py_protobufs': {
            'source_dir':        'path/to/protos',
            'extra_proto_paths': ['path/to/other/project/protos'],
            'output_dir':        'path/to/project/sources',  # default '.'
            'proto_files':       ['relative/path/to/just_this_file.proto'],
        },
    },
)ExampleAn example project is provided athttps://github.com/idex-biometrics/protobuf-grpc-distutils-example.
Package: protobuf-init
protobuf-initTo install:pipinstallprotobuf-initThis package will create__init__.pyfiles when compiling*.protofiles. Optionally, it will create relative imports from generated*_pb.py,*_pb_grpc.py, and*_grpc.pyfiles fromprotobuf,grpcio, andgrpclibpackages, respectively.Using theprotosfolder of this project as an example, the following command will generate the contents of theexamplepackage, also in this project (assuminggrpcio-toolsis installed):exportPROTO_PATH=./protosexportGEN_PATH=.
python-mgrpc_tools.protoc\--python_out=$GEN_PATH\--mypy_out=$GEN_PATH\--init_python_out=$GEN_PATH\--init_python_opt=imports=protobuf+grpcio+grpclib\--grpc_python_out=$GEN_PATH\--grpclib_python_out=$GEN_PATH\--proto_path=$PROTO_PATH$(find$PROTO_PATH-name'*.proto')The--init_python_out=$GEN_PATHflag indicates to call the plugin to create the init files.The--init_python_opt=imports=protobuf+grpcio+grpclibindicates which relative imports to include in the init files. Allowed options areprotobuf,grpcio,grpclib, separated by+. (Note that both grpcio and grpclib generate<ServiceName>Stubobjects which would collide in the init file.)
Package: protobuf-qtypes
# qtypes [![GoDoc](https://godoc.org/github.com/piotrkowalczuk/qtypes?status.svg)](http://godoc.org/github.com/piotrkowalczuk/qtypes)&nbsp;[![BuildStatus](https://travis-ci.org/piotrkowalczuk/qtypes.svg)](https://travis-ci.org/piotrkowalczuk/qtypes)&nbsp;[![CoverageStatus](https://coveralls.io/repos/github/piotrkowalczuk/qtypes/badge.svg?branch=master)](https://coveralls.io/github/piotrkowalczuk/qtypes?branch=master)
Package provides set of types that helps to build complex protobuf messages that can express conditional statements.
Package: protobuf-tools
PurposeTo ease editing and reading protocol buffer filesIt provides easy interface to encode/decode proto filesInstallationThis package can be pip installedpip install protobuf_toolsNoteBuilt and tested with python 2.7 and proto 2UsagePythonyou can import it in your library asfrom protobuf_tools import proto_utilsprotobuftoolsTo use to read/decode any proto files please use the script utility protobuftools
If you do not provide the –proto_path it defaults to the working directory##### For help useprotobuftools -h##### To use json for decode or encode use -json flag##### For enabling all fields to be part of decode use –allfields##### For decoding a protobuf file to more human readable formprotobuftools “<path_to_proto_stream_file>” –proto_path “<optional - provide path to where _pb2 files are>” –decode=message_name –allfields -json#### To display instead of writing to fileprotobuftools “<path_to_proto_stream_file>” –proto_path “<optional - provide path to where _pb2 files are>” –decode=message_name –allfields -json -d##### For encoding - To convert from json/text to protobuf file, output is a file with .protoout extensionprotobuftools “<path_to_file(.json/.txt etc) from above” –proto_path “<optional - provide path to where _pb2 files are>” –encode=message_name -jsonFor BugsJoin the slack workspace at -https://join.slack.com/t/projectaja/shared_invite/enQtMjk1NTk0NzIwNDIzLWRmMTNjMzY3ZGFmYjY4MGZhOTBiNjZjZTA1YzM3MmFmYWIxOTJkY2QyOWNjM2JhZTk3NTMzMzNmZGIyZGM3NmYAnd join the protobuf_tools channelAlso you can email me atpip[at]abhijit.bansal.comFutureAdd UI tools for viewing and editingSupport for python 3 and proto 3Version History0.0.3 : Changed version of protobuf to 3.2.0 should work for any other version too0.0.2 : Changed setup version for protobuf0.0.1 : Initial version, tested upload to pypi
Package: protobuf-uml-diagram
Protobuf UML diagramA tool to generate UML diagrams from Protobuf compiled .proto files.Usage:$protobuf-uml-diagram--proto"cylc.flow.ws_messages_pb2"--output/tmp/Logging output:INFO:__main__:Importingcompiledprotocylc.flow.ws_messages_pb2
INFO:__main__:WritingPNGdiagramto/tmp/ws_messages_pb2.pngImage output:TL;DR$pipinstallprotobuf-uml-diagram(…)$fileissue_10.proto# See ./test_data/ or use your own .proto file.issue_10.proto:ASCIItext
$protoc--python_out=./issue_10.proto
$# The line below modifies PYTHONPATH, which is not necessary if you have a valid Python module/package.$PYTHONPATH=.protobuf-uml-diagram--protoissue_10_pb2--output/tmp
INFO:protobuf_uml_diagram:Imported:issue_10_pb2
INFO:protobuf_uml_diagram:Writingdiagramto/tmp/issue_10_pb2.png
$eog/tmp/issue_10_pb2.pngRunning the command above should create a final image with your diagram as seen below.By default, it uses the full name of the types (e.g.SomeRequest.shipments).
If you would like to use simpler names (i.e.shipments) you can use the option added
in 0.13--full_names=true|false(it istrueby default for backward compatibility).$PYTHONPATH=.protobuf-uml-diagram--protoissue_10_pb2--output/tmp--full_names=falseINFO:protobuf_uml_diagram:Imported:issue_10_pb2
INFO:protobuf_uml_diagram:Writingdiagramto/tmp/issue_10_pb2.png
$eog/tmp/issue_10_pb2.pngNote that doing so, you risk showing fields that are homonyms but that mean different
things. See the related issues#10and#78.Installation$pipinstallprotobuf-uml-diagram
$protobuf-uml-diagramDevelopment$gitclonehttps://github.com/kinow/protobuf-uml-diagram.git
$cdprotobuf-uml-diagram
$pipinstall-e.
$protobuf-uml-diagramDockerGenerate UML diagrams from all (not compiled).protofiles in a directory:./dockerbuild.sh
./dockerrun.sh <path_containing_proto_files> <output_path>LicenseApache License
Package: protoc-exe
Python Protoc ExecutablePyPI packaged Protocol Buffers CompilerA PyPI package providing a pip-installableprotocexecutable.This package does not provide any Python code, it provides just the unalteredprotocexecutable. The versioning thus also follows the official versioning
ofprotoc, and is different to the versioning of theprotobufruntime.The difference of this package toprotoc-wheelandprotoc-wheel-0is that
those packages wrap theprotocin Python. Whereas this package provides just
theprotocexecutable, without anything else. As a consequence you can
directly callprotocafter installing this package in your environment. This
makes it perfect for providing theprotocexecutable wherever you need the
actual thing to be available in yourPATH, e.g. together withbuf(if you do
you might want to check outbuf-exeas well).Notethat this project is not affiliated with or endorsed by Google or the
Protobuf team. The-exesuffix in the name was chosen to ensure that theprotocname stays available, just in case there ever is going to be an
official package.Warningthe redistribution process is not yet fully automated, as I am in
the process of building the tooling. Currently only the latestprotocrelease is available, and it was created semi-manually with the scripts you
currently see in the repository. The plan is to fully automate everything, and
provide newprotocreleases with 24 hours.UsageSimply useprotocas the executable in whatever process abstraction you are
using, regardless of your operating system. The only requirement is that yourPATHis set correctly so that theprotoc(orprotoc.exeon Windows) is
found. For instance, you could usepipand a basic virtual environment:# example.pyimportsubprocesssubprocess.check_call(["command","-v","protoc"])subprocess.check_call(["protoc","--version"])cd/tmp
python-mvenvvenvsourcevenv/bin/activate
pipinstallprotoc-execommand-vprotoc# /tmp/venv/bin/protocprotoc--version# libprotoc x.y[.z]pythonexample.py# /tmp/venv/bin/protoc# libprotoc x.y[.z]rm-frvenv/Notethat the example uses a POSIX compliant shell, but it works on
non-POSIX systems as well. Have a look at the GitHub Actions.
Package: protoc-gen-openapiv2
gRPC Gateway SupportThis repo generates the missing Python code to support code generated usinggRPC Gatewayprotoc annotations.This package depends ongoogleapis-common-protosto providegoogle.api.annotations_pb2and others that
the generated code will depend on. It's also worth noting that the generated protobuf stubs are specific for
the newprotobufmajor version (as described inhttps://developers.google.com/protocol-buffers/docs/news/2022-05-06).Usagepipinstallprotoc-gen-openapiv2BuildingInstall go./gen-openapi-protos.shwill generate the code from grpc-gateway.python -m pip install --upgrade build && python -m buildto build the package.optional- setup PyPi credentials andpython -m pip install --user --upgrade twine && python -m twine upload --repository pypi dist/*
Package: protoc-gen-openapiv2-protoc3-19
gRPC Gateway SupportThis repo generates the missing Python code to support code generated usinggRPC Gatewayprotoc annotations.This package depends ongoogleapis-common-protosto providegoogle.api.annotations_pb2and others that
the generated code will depend on. It's also worth noting that the generated protobuf stubs are specific for
the newprotobufmajor version (as described inhttps://developers.google.com/protocol-buffers/docs/news/2022-05-06).Usagepipinstallprotoc-gen-openapiv2BuildingInstall go./gen-openapi-protos.shwill generate the code from grpc-gateway.python -m pip install --upgrade build && python -m buildto build the package.optional- setup PyPi credentials andpython -m pip install --user --upgrade twine && python -m twine upload --repository pypi dist/*
Package: protoc-gen-pyhttp
protoc-gen-pyhttp一个用于快速将.proto构建为Python使用的HTTP Api工具使用使用PyPI安装安装protoc-gen-pyhttppipinstallprotoc-gen-pyhttp安装可能需要使用的其他软件包pipinstallprotobuf\types-protobuf\googleapis-common-protos\googleapis-common-protos-stubs\grpcio-tools构建HTTP Api需要使用到protoc工具，该工具由grpcio-tools包提供（您也可以使用protobuf的可执行文件替代这个包），同时需要使用到将.proto文件构建为Python类型的功能，protobuf、types-protobuf、googleapis-common-protos、googleapis-common-protos-stubs这些软件包提供了这个功能。将proto文件构建为HTTP Apiprotoc--proto_path=./proto\--python_out=.\--pyi_out=.\--pyhttp_out=.\you_proto_file_list...使用--proto_path设置proto文件所在的路径，该参数可以有多个；使用--python_out设置构建Python类型的存放路径；使用--pyi_out设置构建用于IDE工具识别Python文件的存放路径；使用--pyhttp_out设置构建HTTP Api的存放路径。
Package: protoc-gen-swagger
protoc-gen-swaggerA python package for swagger’s annotation protobuf files, which are located insidegrpc-gatewayrepository.Swaggeris a popular api tool. When you import swagger proto files in your protobuf message file, you may get stuck when using the generated python code.
An import error as the following:ModuleNotFoundError: No module named 'protoc_gen_swagger'With this package, you could forget the error.InstallationWe can simply use pip to install, as the following:$pipinstallprotoc-gen-swaggeror installing from git$pipinstallgit+https://github.com/universe-proton/protoc-gen-swaggerMaintainWhen the source repositorygrpc-gatewayis taged, we can use commandbash gen.sh <tag-version>to update the package.
Maybe we could do some automated work in the future.Now, this package version 0.1.0 is the same as grpc-gateway version v1.3.1 .How to ContributeOpen anissue, join a discussion or make a pull request.
Package: protoc-gen-validate
Protoc-gen-validate (PGV)While protocol buffers effectively guarantee the types of structured data,
they cannot enforce semantic rules for values. This package is a python implementation
ofprotoc-gen-validate, which allows for runtime validation of various
semantic assertions expressed as annotations on the protobuf schema. The syntax for all available annotations is
invalidate.proto. Implemented Python annotations are listed in therules comparison.Examplefromentities_pb2importPersonfromprotoc_gen_validate.validatorimportvalidate,ValidationFailed,validate_allp=Person(name="Foo")try:validate(p)exceptValidationFailedaserr:print(err)# p.id is not greater than 999try:validate_all(p)exceptValidationFailedaserr:print(err)# p.id is not greater than 999# p.email is not a valid email# p.name pattern does not match ^[^[0-9]A-Za-z]+( [^[0-9]A-Za-z]+)*$# home is required.
Package: protoc-java-resource-names-plugin
The GAPIC Proto Compiler Plugin is used to add functionality to protobuf
generated types. The additional functionality is required by client libraries
generated using the GAPIC code generation tool, which reside in theToolkitrepository.Currently, this means generating resource name types in Java. The new resource
name types will be accessible via getter and setter methods added to the
generated types.Python VersionsGAPIC Proto Compiler Plugin is currently tested with Python 2.7, 3.4, 3.5 and 3.6.ContributingContributions to this library are always welcome and highly encouraged.See theCONTRIBUTINGdocumentation for more information on how to get started.VersioningThis library followsSemantic VersioningIt is currently in major version zero (0.y.z), which means that anything
may change at any time and the public API should not be considered
stable.LicenseBSD - SeeLICENSEfor more information.