A commandline 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
poetry install
Run tests
To run the tests suite, use the following command:
poetry run 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
comexdown-1.4.1.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for comexdown-1.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ccb1dd75f065ede793904155fb403827202f7f9ec208cd4550b5b41ee10d7f3 |
|
MD5 | e6643c163e273b6bf54f3ccd0599a9ed |
|
BLAKE2b-256 | e42642c6240d3a43be8f5f90d5823ea49a8ba096a87106b8a77b26c5b30776e9 |