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.2.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d134ee7089b289b435eed1885dcc6cad044ba740d893ee83e63a7c55621d278 |
|
MD5 | 25f5a5dfc72785e690489a3cf494b160 |
|
BLAKE2b-256 | a7846346a96ae501f6ad3cbaf51785636f3c738148e14d3a9d53b9305d2b8210 |
Close
Hashes for comexdown-1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcba70a94d4535ea7fcd666a3b5d5d0d373fc83cf893138fd9e81e6b6271f33f |
|
MD5 | 197287e9d377ee8cfa135756cca7c111 |
|
BLAKE2b-256 | 9f23da9c8230dcd54be256fc49e2b93e518fa23fd02b15fe0a5eeb9fffcd79ec |