Giter Site home page Giter Site logo

auroradigital-it / paapi_amazon_webserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eliatolin/paapi_amazon_webserver

0.0 0.0 0.0 149 KB

Implementing the Amazon PA API using Flask as a webserver and Redis for caching offers.

License: GNU General Public License v3.0

Python 99.75% Dockerfile 0.25%

paapi_amazon_webserver's Introduction


PAAPI Amazon Webserver

Implementing the Amazon PA-API using Flask as a webserver and Redis for caching offers.



Report Bug . Request Feature

Contributors Forks Stargazers Issues License

About The Project

PAAPI Amazon Webserver is a webserver that simplifies operations through api pa.

It allows the caching of offers of the requested categories, for a configurable time, saved in a Redis database. It is possible to use this server as a backend for applications or web pages where offers are displayed.

PAAPI Amazon Server has the automatisms you are looking for for offers and limit the consumption of API requests.

Built With

The server use Redis for the cache and Flask as the web server. Use a wrapper for pa api.

Getting Started

It is recommended to use a virtualenv. A Docker is provided that allows the use of Redis, if you want you can use your own Redis database.

Installation

  1. Get AP Amazon credentials.
  2. Clone the repo
git clone https://github.com/EliaTolin/paapi_amazon_webserver/
  1. Install dependencies
pip install -r requirements.txt
  1. Enter your API Credentials in config.py
AMAZON_ACCESS_KEY = 'YOUR_ACCESS_KEY'
AMAZON_SECRET_KEY = 'YOUR_SECRET_KEY'
AMAZON_PARTNER_ID = 'YOUR_PARTNER_ID'
AMAZON_COUNTRY = 'YOUR_COUNTRY_ID'
  1. Start webserver.
python main.py

Be sure you have a redis instance.

Otherwise use the Docker-compose for development but before configure the config.py file.

docker-compose up -d

Usage

The webserver provides two endpoints, others will be in development if requested.

  • /api/v1/pa_amazon/search_product

    Use this to have products returned to you based on the parameters provided.

  • /api/v1/pa_amazon/get_category_offers

    Use this to make you return the products on offer or not regarding a certain category, it saves it in the DB with a timeout, if it is requested again it provides the results saved in the cache without re-downloading them. It has systems to handle the TooManyRequest error.

Creating A Pull Request

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Authors

  • Elia Tolin - Founder of Aurora Digital - Elia Tolin -

paapi_amazon_webserver's People

Contributors

eliatolin avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.