# 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](https://mercadoradar.readme.io/).
## 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:
```shell
pip install mercadoradar
```
## Usage
### Authentication
The library needs to be configured with your users's API Token which you can get it through
suporte@mercadoradar.com.br
1. Set it as the `MERCADORADAR_TOKEN` environment variable before using the library:
```shell
export MERCADORADAR_TOKEN='YOUR_API_TOKEN'
```
2. Or set directly on initialization:
```python
from mercadoradar import MercadoRadar
mercadoradar = MercadoRadar(token='YOUR_API_TOKEN')
```
### Resources
All resources have the methods:
* create
* retrieve
* update
* delete
* list
| Resource | Module |
|-------------------------|-------------------------|
| Account | account |
| Attribute Type | attribute_type |
| Attribute Value | attribute_value |
| Brand | brand |
| Category | category |
| Filter | filter |
| Product | product |
| Product Attribute Value | product_attribute_value |
| Product History | product_history |
| Search | search |
| Seller | seller |
| Site | site |
| User | user |
### Examples
```python
from mercadoradar import MercadoRadar
mercadoradar = MercadoRadar(token="YOUR_TOKEN")
products = mercadoradar.product.list()
out_of_stock_products = mercadoradar.product.list(status=["OUT_OF_STOCK"])
my_product = mercadoradar.product.retrieve(id=1)
sellers = mercadoradar.seller.list()
my_seller = mercadoradar.seller.retrieve(id=1)
brazil_sites = mercadoradar.site.list(country="BRAZIL")
my_product_history = mercadoradar.product_history.list(product_id=1)
```
## Requirements
Python 3.10.*
## Development
1. Install dependencies
```shell
poetry env use python3.10
poetry config virtualenvs.in-project true
poetry install
```
## Publish
```shell
poetry config pypi-token.pypi <TOKEN>
poetry build
poetry publish --build
```
## 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.
Raw data
{
"_id": null,
"home_page": "https://www.mercadoradar.com.br/?utm_source=pip",
"name": "mercadoradar",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.10.6",
"maintainer_email": null,
"keywords": "mercadoradar, mercadoradar-sdk",
"author": "Mercado Radar",
"author_email": "dev@mercadoradar.com.br",
"download_url": "https://files.pythonhosted.org/packages/b3/ca/4bb6724634c89cfa18553b62cec6a2af702af5266f04c07b25370870882c/mercadoradar-2.0.8.tar.gz",
"platform": null,
"description": "# Mercado Radar - SDK\n\nThe Mercado Radar SDK library provides convenient access to the Mercado Radar API from applications written in the\nPython language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from\nAPI responses.\n\nFor more information visit the [API Documentation](https://mercadoradar.readme.io/).\n\n## Installation\n\nYou don't need the source code unless you want to modify the package for contribution. If you just want to use the\npackage, just run:\n\n```shell\npip install mercadoradar\n```\n\n## Usage\n\n### Authentication\n\nThe library needs to be configured with your users's API Token which you can get it through\nsuporte@mercadoradar.com.br\n\n1. Set it as the `MERCADORADAR_TOKEN` environment variable before using the library:\n\n```shell\nexport MERCADORADAR_TOKEN='YOUR_API_TOKEN'\n```\n\n2. Or set directly on initialization:\n\n```python\nfrom mercadoradar import MercadoRadar\n\nmercadoradar = MercadoRadar(token='YOUR_API_TOKEN')\n```\n\n### Resources\n\nAll resources have the methods:\n\n* create\n* retrieve\n* update\n* delete\n* list\n\n| Resource | Module |\n|-------------------------|-------------------------|\n| Account | account |\n| Attribute Type | attribute_type |\n| Attribute Value | attribute_value |\n| Brand | brand | \n| Category | category |\n| Filter | filter |\n| Product | product |\n| Product Attribute Value | product_attribute_value |\n| Product History | product_history |\n| Search | search |\n| Seller | seller |\n| Site | site |\n| User | user |\n\n\n### Examples\n\n```python\nfrom mercadoradar import MercadoRadar\n\nmercadoradar = MercadoRadar(token=\"YOUR_TOKEN\")\n\nproducts = mercadoradar.product.list()\nout_of_stock_products = mercadoradar.product.list(status=[\"OUT_OF_STOCK\"])\nmy_product = mercadoradar.product.retrieve(id=1)\n\nsellers = mercadoradar.seller.list()\nmy_seller = mercadoradar.seller.retrieve(id=1)\n\nbrazil_sites = mercadoradar.site.list(country=\"BRAZIL\")\n\nmy_product_history = mercadoradar.product_history.list(product_id=1)\n```\n\n## Requirements\n\nPython 3.10.*\n\n## Development\n\n1. Install dependencies\n\n```shell\npoetry env use python3.10\npoetry config virtualenvs.in-project true\npoetry install\n```\n\n## Publish\n```shell\npoetry config pypi-token.pypi <TOKEN>\npoetry build\npoetry publish --build\n```\n\n\n## Licence\n\nMIT License\n\nCopyright (c) 2025 Mercado Radar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python client library for Mercado Radar API",
"version": "2.0.8",
"project_urls": {
"Documentation": "https://mercadoradar.readme.io/",
"Homepage": "https://www.mercadoradar.com.br/?utm_source=pip"
},
"split_keywords": [
"mercadoradar",
" mercadoradar-sdk"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "90912bc0062b196bee16a1590c7f72c90c0c13281e011e1abd56dff2b48bafb3",
"md5": "7bc3066f869fe03745c88696a89d7a2c",
"sha256": "af9fada6e965ea797e4a4253b2e2e465b4d2b702095204c981e98aed2b4b7221"
},
"downloads": -1,
"filename": "mercadoradar-2.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7bc3066f869fe03745c88696a89d7a2c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.10.6",
"size": 29166,
"upload_time": "2025-02-28T00:39:34",
"upload_time_iso_8601": "2025-02-28T00:39:34.703037Z",
"url": "https://files.pythonhosted.org/packages/90/91/2bc0062b196bee16a1590c7f72c90c0c13281e011e1abd56dff2b48bafb3/mercadoradar-2.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b3ca4bb6724634c89cfa18553b62cec6a2af702af5266f04c07b25370870882c",
"md5": "28fbd7436dae6413e88662dddda837de",
"sha256": "5433866e41df31138fe108b7b7647a36e28f78a873ef6fde9a379cb27acba010"
},
"downloads": -1,
"filename": "mercadoradar-2.0.8.tar.gz",
"has_sig": false,
"md5_digest": "28fbd7436dae6413e88662dddda837de",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.10.6",
"size": 14166,
"upload_time": "2025-02-28T00:39:36",
"upload_time_iso_8601": "2025-02-28T00:39:36.990189Z",
"url": "https://files.pythonhosted.org/packages/b3/ca/4bb6724634c89cfa18553b62cec6a2af702af5266f04c07b25370870882c/mercadoradar-2.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-28 00:39:36",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mercadoradar"
}