Giter Site home page Giter Site logo

tryargus_plaid's Introduction

Tryargus Plaid

Flask API connected to a third party

Simple flask API that connects to a 3rd party API (Plaid) in order to read, store (in memory), and serve some data.

Description

Using the sandbox environment of Plaid. Build a simple API with the following resources:

Resource Method BODY RESPONSE
/ GET - 200 "Healthy"
/exchange POST {“public_token”: “<public_token>”} 201
/query POST -
  • If called before “/exchange”, returns a 404
  • 201
/account GET - 200 & response from “/query”

Local use

Deploy

Create and activate local environment

python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt

Deploy locally

python3 application.py

Now it is working in http://127.0.0.1:5000/

Test

Only execute

py.test -vv --disable-pytest-warnings

I had used pytest-ordering to avoid cache problems between tests

AWS Instance

http://flask-env.eba-pxrp9ipm.us-east-2.elasticbeanstalk.com/

Postman Collection

Local and AWS https://www.getpostman.com/collections/b301c1865c145436f3bf

Roadmap

  • Create account in Plaid
  • Create Integration test suit
  • Build the resource API skeleton
  • Create methods to call the API
  • Complete the test suit
  • Create an AWS instance and deploy it
  • Postman collection

Notes

  1. As it is a test in a sandbox environment and to facilitate the tests by third parties, I have not encrypted the sensitive information to connect with the Plaid API. Of course, this is something to be avoided in real projects (using AWS env or GitHub Actions for example).

  2. I have preferred to use http requests directly because Plaid PostMan collection has better explained and completed than Plaid python library documentation.

  3. For the same reason of Note 1, I have not configured any security in AWS instance (all directions allowed). Obviously it is only for a test case.

tryargus_plaid's People

Contributors

asacristani avatar

Watchers

James Cloos avatar  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.