Giter VIP home page Giter VIP logo

newstore_connector's Introduction

NewStore Connector

A collection of tools for creating APIs and API Connectors

Current Version: 0.1.0

Installation

Can be installed with pip: pip install git+https://github.com/kyleranous/newstore_connector.git That will install the current stable release.

To install a specific version use: pip install git+https://github.com/kyleranous/newstore_connector.git@[version]

It can then be imported into your project with:

import newstore_connector

Usage

See the package Documentation for useage instructions.

Running the Tests

This package uses pytest. To run the tests and evaluate coverage:

  1. Make sure you have installed the development dependencies with pipenv install -d
  2. Run coverage run -m pytest
  3. Evaluate all tests have passed
  4. Evaluate test code coverage by running coverage report

Built With

Contributing

See Contributing Guidelines

Versioning

We use Semantic Versioning for this project. For the versions available, see the tags on this repository.

Authors

License

TBD

newstore_connector's People

Contributors

kyleranous avatar

Watchers

 avatar

newstore_connector's Issues

Create a NewStoreAPI Base Class

All API Classes should extend this base class. This base class will hold the common variables and setup any custom logging logic.

Create NewStoreConnector class

Class should take in a tenant, stage (optional) and either a User Name and Password OR a valid API key.

NewStoreConnector class should also act as a constructor for specific API connector classes.

Create Logging Handler for NewStoreConnector class

The logging Handler should collect all logging levels and store them in an instance variable. This way the logs can be accessed in the event of an error with additional debug information and the debug information won't clog up the logs.

Create contributing guide

Contributing guide should include instructions for creating API classes, how to populate the handlers in the NewStoreConnector class, Setting up tests and Calculating code coverage.

Come up with a method to automatically migrate from an old version of a payload to a new version

Need to come up with a way to automatically migrate requests from old API to new API versions if they are able to be migrated automatically.

If the FORMAT of the data hasn't changed, OR if a simple data formatting change has been made, IE, a field tool in a float, but now requires the field to be formatted as a string.

~~I think this can be done with the idea of using the NewStoreConnector class as the entry point for each groups specific version class. An intermediate check will need to be done to see if the payload versions can be automatically transformed, if they can, it will register the transformation method used to change the payload. Then the new version should be used and the transformation method called on the payload before it is sent. ~~
This can probably be done with a decorator at the method level. This would allow a modification function and the new endpoint to be passed. Doing it at the method level will allow more finite control.

In the event the transformation fails, the original API version should be used to attempt completion. The process should also allow for a keyword argument to be passed, like allow_upgrade = False to bypass that modification.

In any case, a warning should be raised that either the new API version was used and the code needs to be updated, or a new version is available and code should be updated when able.

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.