Skip to main content

Python client library for the Mercado Radar API

Project description

Mercado Radar - SDK

The Mercado Radar SDK library provides convenient access to the Mercado Radar API from applications written in the Python language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses.

For more information visit the API Documentation.

Installation

You don't need the source code unless you want to modify the package for contribution. If you just want to use the package, just run:

pip install mercadoradar

Usage

The library needs to be configured with your account's secret key which you can access through suporte@mercadoradar.com.br.

  1. Set it as the MERCADORADAR_API_TOKEN environment variable before using the library:
export MERCADORADAR_API_TOKEN='YOUR_API_TOKEN'
  1. Or set mercadoradar.api_token to its value:
import mercadoradar

mercadoradar.api_token = 'YOUR_API_TOKEN'

Attribute

import mercadoradar

mercadoradar.Attribute.list(attribute_type: str, search: str = None) -> list

Attribute Type

import mercadoradar

mercadoradar.AttributeType.list(limit: int = 100, offset: int = 0) -> list

Category

import mercadoradar

mercadoradar.Category.list(limit: int = 100, offset: int = 0) -> list
mercadoradar.Category.retrieve(id: int) -> dict

Export

import mercadoradar

mercadoradar.Export.product_history(date: date) -> bytes

Product

import mercadoradar

mercadoradar.Product.list(limit: int = 100,
offset: int = 0,
attributes_ids: list = None,
category_ids: list = None,
highest_price: float = None,
lowest_price: float = None,
product_names: list = None,
seller_ids: list = None,
site_ids: list = None,
status: str = None) -> list

mercadoradar.Product.retrieve(id: int) -> dict

mercadoradar.Product.history(id: int,
limit: int = 100,
offset: int = 0,
date__gte: date = None,
date__lte: date = None) -> list
  • status (str): Choices are ACTIVE, OUT_OF_STOCK, URL_NOT_FOUND

Seller

import mercadoradar

mercadoradar.Seller.list(limit: int = 100, offset: int = 0) -> list

Site

import mercadoradar

mercadoradar.Site.list(limit: int = 100, offset: int = 0) -> list

Requirements

Python 3.10.*

Contribution

  1. Make a fork from https://github.com/mercadoradar/mercadoradar-sdk

  2. Install dependencies

python -m venv .venv
source .venv/bin/activate
pip install pipenv
pipenv install
  1. Open a Pull-Request

Licence

MIT License

Copyright (c) 2025 Mercado Radar

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

mercadoradar-1.0.5.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

mercadoradar-1.0.5-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file mercadoradar-1.0.5.tar.gz.

File metadata

  • Download URL: mercadoradar-1.0.5.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for mercadoradar-1.0.5.tar.gz
Algorithm Hash digest
SHA256 18ed97e48beb0c218ecdf6ea5f34c196adbf47de78d28a96cae5c5ae59ecb118
MD5 beb47c51deb06697957f0b95faf749ff
BLAKE2b-256 abc07c6606fbcb63c046f918242e1466d3b3f828c37f4070488690d47a9dcb07

See more details on using hashes here.

File details

Details for the file mercadoradar-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: mercadoradar-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for mercadoradar-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bb431f5f259d9315575cb814c1817eb3880c65c5977c68796166411ddc1ee3d8
MD5 b04fa8f120ea6813db8f71a8a160d8b0
BLAKE2b-256 6d6eac6503c5110804e4efd46864ecc36c86f0b144b117fcdd4c5ced7d9087f2

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