Code Monkey home page Code Monkey logo

fetchable-python's People

Contributors

andrew-murtagh avatar andrewmurtagh avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

fetchable-python's Issues

Move documentation of endpoints to a docs directory

What problem / inefficiency does your enhancement address?

If all documentation on the endpoints for every version of the API ends up in the main README it will become too large.

Describe the solution you'd like to see implemented

A docs folder with a different .rst file for every version of the backend. e.g. v0.1.rst, v0.2.rst, etc. These should be linked from the main README file.

Are there any alternative approaches?

Move all documentation outside of Github such as readthedocs.org, etc.

Who is requesting this feature?

@Andrew-Murtagh

Anything else?

Nope :)

Add function annotations

What problem / inefficiency does your enhancement address?

It's difficult to know the data types when looking at the code

Describe the solution you'd like to see implemented

Adding function annotations to function signatures.

Are there any alternative approaches?

Add data types in comments and in documentation. This is more pythonic.

Who is requesting this feature?

@Andrew-Murtagh

Anything else?

N/a

Validity checking for auth file

Is your feature request related to a problem? Please describe.
A problem hasn't occurred yet, but could easily.

Describe the solution you'd like
When reading the authentication file, the library checks it is a valid json object, contains the correct keys and their value is of the correct type and length.

Describe alternatives you've considered
N/A

Additional context
N/A

Perform sanitisation within the library

Is your feature request related to a problem? Please describe.
Takes additional effort on behalf of the client to sanitize the inputs, i.e. to transform multiple, and potentially capitalised words, into snake case. E.g.

client.fetch_entity_attribute("Empire State building", "Height")

should be entered as:

client.fetch_entity_attribute("empire_state_building", "height")

Describe the solution you'd like
Create a private helper function in the client FetchableClient class which transforms any input into the correct format before making a request to the backend.

Describe alternatives you've considered
Do not create helper function and do the transformation in each function, i.e. within the 'fetch_entity_attribute' function - or any other functions.

Additional context
N/A

Breaks with Python 3

Describe the bug
library returns {status_code: 1003, reason: unknown error occurred} when fetching something and using python 3.

To Reproduce
Steps to reproduce the behavior:

  1. pip3 install .
  2. python3 samples/main.py

Expected behavior
The library should have returned a valid response.

System

  • Device: Dell XPS laptop
  • OS: Linux Ubuntu 18 desktop
  • Language version: python3.4

Additional context
N/A

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.