A little utility to download Brazil's foreign trade data
Project description
comexdown: Brazil's foreign trade data downloader
This package contains functions to download brazilian foreign trade data published by Ministerio da Economia(ME)/Secretaria de Comercio Exterior (SCE).
Installation
comexdown
package is available on PyPI, so just use pip
!
pip install comexdown
Usage
import comexdown
# Download main NCM table in the directory ./DATA
comexdown.ncm(table="ncm", path="./DATA")
# Download 2019 exports data file in the directory ./DATA
comexdown.exp(year=2019, path="./DATA")
Command line tool
Download data on Brazilian foreign trade transactions (Exports / Imports).
You can specify a range of years to download at once.
comexdown trade 2008:2019 -o "./DATA"
Download code tables.
comexdown table all # Download all related code files
comexdown table uf # Download only the UF.csv file
comexdown table ncm_cgce # Download only the NCM_CGCE.csv file
comexdown table nbm_ncm # Download only the NBM_NCM.csv file
Development
To setup a development environment clone this repository and install the required packages:
git clone https://github.com/dankkom/comexdown.git
cd comexdown
pipenv install --dev # Requires Python 3.9
Run tests
To run the tests suite, use the following command:
pytest --cov=comexdown --cov-report term-missing --cov-report html tests/
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
Built Distribution
Close
Hashes for comexdown-1.3.3.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fa81025066baaa0e8fc49ec75e9eb1851f97b366cd416a73f12e52bb09b3ce7 |
|
MD5 | d512abe4416fcc45a16f3f946d51e2f6 |
|
BLAKE2b-256 | 566eae867c3f44f7d662127c95b8b705f6f772d85329dc689df4b759fb9ff040 |
Close
Hashes for comexdown-1.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8b9b60bc4417c21e4d246f45cb56cb966390f6eaf630ec8f8e9a6a3af8fcc45 |
|
MD5 | 477adb83fcc20aa4738222b7ac91f0df |
|
BLAKE2b-256 | a8f76486fb590c94b18a76d3d0789af65101682137511171aa0f460100acb87c |