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/
Metadata
Release files for comexdown 1.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| comexdown-1.5.2.tar.gz | 12.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| comexdown-1.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.2 kB
Release files / comexdown-1.5.2.tar.gz
| Download URL | comexdown-1.5.2.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e63eeed4186a321631a98f84ddb9b4b42b832454608935db36f690650871a42
|
|
BLAKE2b-256 checksum How to use checksums |
941f33c6c37d2ecd9d8c5fd4ea6a2ce63ede84ff0c670b2a55c7bd61da704cfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / comexdown-1.5.2-py3-none-any.whl
| Download URL | comexdown-1.5.2-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b045aeaebee1a926be0ac3e1e49c81ce4c1564ea7f5057d98fb4ce4cf252b1b3
|
|
BLAKE2b-256 checksum How to use checksums |
d9dd9fc0eb049afd4ab05e8b736f591061527c45fa672eba5f02314b1bb59bbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|