Skip to main content

A commandline utility to download Brazil's foreign trade data

Project description

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/

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.5.2.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

comexdown-1.5.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file comexdown-1.5.2.tar.gz.

File metadata

  • Download URL: comexdown-1.5.2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for comexdown-1.5.2.tar.gz
Algorithm Hash digest
SHA256 6e63eeed4186a321631a98f84ddb9b4b42b832454608935db36f690650871a42
MD5 e4fff45eb99eb5848f2fd8e808d204b8
BLAKE2b-256 941f33c6c37d2ecd9d8c5fd4ea6a2ce63ede84ff0c670b2a55c7bd61da704cfb

See more details on using hashes here.

File details

Details for the file comexdown-1.5.2-py3-none-any.whl.

File metadata

  • Download URL: comexdown-1.5.2-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for comexdown-1.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b045aeaebee1a926be0ac3e1e49c81ce4c1564ea7f5057d98fb4ce4cf252b1b3
MD5 ea1722d89037a2927763eacc4989b706
BLAKE2b-256 d9dd9fc0eb049afd4ab05e8b736f591061527c45fa672eba5f02314b1bb59bbc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page