Git Product home page Git Product logo

solidata-backend's Introduction

SOLIDATA
backend


PRESENTATION

part 2a/3 of the TADATA! sofware suite (ApiViz / Solidata_frontend / OpenScraper )

Building a public service for managing, consolidating, and sharing "API-fied" data


GOALS

  • allow you to consume data from your own csv/xls files or external APIs ;
  • consolidate your data : apply your own datamodel, simplify columns, apply metadatas, ... ;
  • share the consolidated datas on API endpoints with the level of openness you decide (opendata, commons, collective, private) ;
  • manage all your data and your recipes by projects ;
  • be able to manage projects by teams and share data/recipes/datamodels...

DEVELOPPERS

Nice to see you around ! For a more complete tour check out :


TECHNICAL POINTS

Tech stack

  • Language : Python 3.6... yes ... I know ... Python again ... hmmm ... gnnn ... don't judge me ?!
  • Framework : Flask... minimalistic Python framework
  • API : Flask-RestPlus... Swagger documentation integrated
  • Security : Flask-JWT-extended... wrapper JWT for Flask
  • Emailing : Flask-email... templating, sending, etc...
  • Data management : Pandas... to do operations on datasets...
  • Geocoding : Geopy... to use several geocoders : Nominatim, BAN, etc...

Features :

  • JWT (JSON Web Tokens) :
    • access and refresh token for security over all the app
  • user :
    • anonymous login (automatic)
    • login / register user
    • confirm user by sending a confirmation link (protected) in an email
    • password forgotten by sending a link (protected) in an email with redirection to new password form
    • reset password from client interface (protected) ...
  • Documentation
    • on all API endpoints with Swagger (and some patience from the developer)
Current features TO DO :
  • user :
    • edit user
    • edit email
  • add/edit a project :
    • edit team and access levels
    • add project to users involved

WHAT'S NEW ?

  • check out our our changelog for more details

INSTALLATION WALKTHROUGH

LOCALLY

  • clone / fork the depo ...

  • create a virtual environment for Python3

     python3 -m venv venv
     pip install --upgrade pip
     pip install -r requirements.txt
  • create a secret config_file config_prod.py in the folder ./solidata_api based

     cp ./solidata_api/config_pro_exampled.py ./solidata_api/config_prod.py
     nano ./solidata_api/config_prod.py 
  • pay attention at the MONGO_URI variable depending on your local mongodb configuration...

    • The following is the standard URI connection scheme (from mongo documentation):
       mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
      
  • run the app in dev mode (without possibility to send email) :

     python appserver.py --mode=dev
  • run the app in dev mode (with possibility to send email) :

     python appserver.py --mode=dev_email

PRODUCTION

  • Check our snippets folder for more instructions

  • for now we are using the following configuration

    • droplet in digitalocean.com
    • ubuntu 18.04
    • 3Go RAM / 2CPU
    • 60Go memory
  • configure your server (user, firewall...):

  • install mongodb :

  • install nginx :

  • install git on your server

    • cf : docs 1 - basically :
       sudo apt-get update
       sudo apt-get install git
       git --version
    • go to your directory and init git :
       git init . 
       git remote add origin https://github.com/entrepreneur-interet-general/solidata_backend.git
       git pull origin master
      
  • same steps than for local installation (virtual env, install dependencies, config_prod.py file, ) ...

  • run the app in production mode (with possibility to send email) :

     python appserver.py --mode=production

INSPIRATIONS / BENCHMARK

  • Dataiku, Parabola, but they are proprietary solutions (and too complex for our pruposes)... Not to mention they are very expensive...
  • Match ID, but the backend doesn't resolve the "sharing" part with levels as ["opendata", "commons", "collective", "private"], and no BDD to back up recipes

CREDITS

Solidata's backend team thanks :

Contacts - maintainance :


SCREENSHOTS


alt text


alt text


alt text


alt text

solidata-backend's People

Contributors

julienparis avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

transformaps

solidata-backend's Issues

Install won't work

Hi,
I wanted to test solidata on local.
Either with manual install (cf README) or using make gunicorn-dev, i am unable to start the backend.

#9 20.41 ERROR: Cannot install -r requirements.txt (line 51) and urllib3==1.25.3 because these package versions have conflicting dependencies.
#9 20.41 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
#9 20.57 WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
#9 20.57 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

I encounter a version problem.
When manually install dependancies (pip install urllib3 and other dependancies that are not mentionned in requirements.txt), I still block on something that might be due to python version.

--- STARTING SOLIDATA API ---

Traceback (most recent call last):
  File "/Users/ledjodje/projects/solidata/solidata-backend/appserver.py", line 197, in <module>
    app_runner()
  File "/Users/ledjodje/projects/solidata/solidata-backend/venv/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/ledjodje/projects/solidata/solidata-backend/venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/ledjodje/projects/solidata/solidata-backend/venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/ledjodje/projects/solidata/solidata-backend/venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/ledjodje/projects/solidata/solidata-backend/appserver.py", line 150, in app_runner
    from solidata_api.application import create_app
  File "/Users/ledjodje/projects/solidata/solidata-backend/solidata_api/application.py", line 139
    from solidata_api._core.async_tasks import async
                                               ^
SyntaxError: invalid syntax

Could you update the install process ?
Thanks

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.