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

Uploaded Source

File details

Details for the file protoDadosjusbr-0.82.tar.gz.

File metadata

  • Download URL: protoDadosjusbr-0.82.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for protoDadosjusbr-0.82.tar.gz
Algorithm Hash digest
SHA256 8c313bef25d78d1a9eda982fc847c8d3de2c06cb719923915b259535bd0b84fa
MD5 ed005b832b36336128935887a154d1f3
BLAKE2b-256 a397a2828141bdbfff5d58b16676afe545c7ca698e6a19f897edd7d51f591d3e

See more details on using hashes here.

Supported by

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