Skip to main content

comexdown: Brazil's foreign trade data downloader

GitHub PyPI

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)

Source distribution for comexdown 1.5.2
File Size Uploaded
comexdown-1.5.2.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for comexdown 1.5.2
File Interpreter ABI Platform
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}

Release history Release notifications | RSS feed

This release

1.5.2 This release

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.2

2 release files

1.1

2 release files

1.0

1 release file

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