Skip to main content

Contém esquema de dados e funções para os coletores do DadosjusBr

Project description

Proto

  • Esquema de dados em Protobuf.

Instalando o proto

    $ apt install -y protobuf-compiler

Gerar código go e python

Gerando novos protos

GO

    $ go install google.golang.org/protobuf/cmd/protoc-gen-go

// Gerar stub na raiz.

    $ cd coleta
    $ protoc --go_out=./ --go_opt=paths=source_relative coleta.proto
    $ cd ..
    $ protoc --go_out=pipeline/ --go_opt=paths=source_relative --proto_path=coleta --proto_path=pipeline pipeline/pipeline.proto

Python

// Gerar stub na raiz.

    $ cd coleta
    $ protoc --python_out=./ coleta.proto
    $ cd ..
    $ protoc --python_out=pipeline/ --proto_path=coleta --proto_path=pipeline pipeline/pipeline.proto

Casos de erro ao tentar gerar proto

Caso o seguinte erro tenha ocorrido, significa que a instalação da lib do protobuf não funcionou:

"protoc-gen-go: program not found or is not executable--go_out: protoc-gen-go: Plugin failed with status code 1."

Para consertar, você deve executar os seguintes comandos:

    $ export GOPATH=$HOME/go
    $ export PATH=$PATH:$GOPATH/bin
    $ go install google.golang.org/protobuf/cmd/protoc-gen-go

Após isso, você conseguirá gerar o proto.

Atulizando a lib no pipy

    $ python3 setup.py sdist
    $ python3 -m twine upload --skip-existing dist/*

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

protoDadosjusbr-0.82.tar.gz (7.0 kB view hashes)

Uploaded Source

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