Skip to main content

b3tojson

This utility is intended to help converting B3 (Brasil, Bolsa, Balcão) own data format to a more portable and usable format like JSON.

Dependencies

  • jsonpickle==1.3
  • requests==2.23.0

For testing only

  • pytest==5.4.1
  • pytest-mock==3.0.0

Installing

From source

pip install -r requirements.txt

pip install .

From PyPI

pip install b3tojson

Running

There are some configurable parameters when running in the command line. It is even possible to automatically get the latest source file and parse into a new JSON. Options are:

  • --fetch Enables downloading of a new data file from B3 server. It will consider this file when parsing. This is disabled by default, try to parse a local file under files folder.
  • --b3_file FILENAME Specifies the local data file location. Make sure that it is UTF-8 encoded, other encoding may not work.
  • --json_file JSONNAME Specifies the name of the resulting JSON file. Defaults to files/stocks_data.json.

Important to note that --fetch and --b3_file are mutually exclusive.

Example

  1. Running to fetch a new file and customize the resulting JSON

b3tojson --fetch --json_file files/beautiful_file.json

  1. Using a local file to parse

b3tojson --b3_file files/my_local_file.txt

Metadata

Release files for b3tojson 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for b3tojson 1.0.1
File Size Uploaded Provenance Actions
b3tojson-1.0.1.tar.gz 21.2 kB Without provenance Details for b3tojson-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for b3tojson 1.0.1
File Interpreter ABI Platform Actions
b3tojson-1.0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for b3tojson-1.0.1-py2.py3-none-any.whl

Total release size: 27.9 kB

Release files / b3tojson-1.0.1.tar.gz

Download URL b3tojson-1.0.1.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8ee68451f641ababeb34c9eab8c2a41dbbc61bc29d12d7f434967fdf3f84a7a5
BLAKE2b-256 checksum
How to use checksums
a739339851cd67237212797141dc9ff87c3821a961180493f55171c0974506fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Release files / b3tojson-1.0.1-py2.py3-none-any.whl

Download URL b3tojson-1.0.1-py2.py3-none-any.whl
Size 6.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a9c3724ea59ef9487d505aa4f6a8aaa88f68ffe7cf5190a00afbfc26d3109152
BLAKE2b-256 checksum
How to use checksums
6c5333474b2278d11da7f94c51fcd041e0f15392deca779c3ca5c69cfa287fe7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Security for b3tojson 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page