Giter Site home page Giter Site logo

Comments (8)

isms avatar isms commented on May 24, 2024 1

Closing but still open to hearing more about this if people have specific improvement proposals.

from cookiecutter-data-science.

 avatar commented on May 24, 2024

@ricalanis can you give a better description of what is the flow of an API driven project?
or link to some resources about it? just to maintain a clean discussion.

from cookiecutter-data-science.

ricalanis avatar ricalanis commented on May 24, 2024

Of course @MrOutis

I would say that a Data Science project is api-driven when an API is defined throughout the data science process to:

  1. Make raw and intermediate data available in an endpoint
  2. When an output is directed to an API to be interactive (From a dataviz to a simple data product)

Maybe I am skewed, but with Flask it is relatively easy to make this leap and I would like to have a clearer view on this can be included on the flow that this project proposes.

A source that covers this:
http://www.datacommunitydc.org/blog/2014/02/flask-mega-meta-tutorial-data-scientists

from cookiecutter-data-science.

isms avatar isms commented on May 24, 2024

So far, when setting up an API (or web app, or streaming data pipeline, microservice, etc) under this structure, we have been putting it in its own folder within src/. Let's say I was going to write a small API with Flask/Flask-RESTful. I'd create a directory for it and put my source code files in there:

/
└── src
    └── api
        ├── app.py
        └── __init__.py

Then to run it you could python src/api/app.py from the project root. You could even create a rule in the Makefile to run this, or create a Dockerfile to run it in a container — whatever entry point makes the most sense for your project.

Does that cover the use case you have in mind @ricalanis or do you think more changes are necessary to the existing structure?

from cookiecutter-data-science.

ricalanis avatar ricalanis commented on May 24, 2024

Seems legit! Really covers my use case, thanks!

I wonder if such /src/api folder should be in the default folder structure, as such scripts that make your models or data discoverable can be, for me, as useful as the viz generating code. Of course one runs the risk of growing the folder structure bigger and bigger to cover such use cases. What do you guys, @MrOutis @isms , think?

from cookiecutter-data-science.

isms avatar isms commented on May 24, 2024

Interesting! This is not a common use case for us but we're very open to hearing more from the community.

Instead of closing this issue, I'm going to create a needs-discussion label so we can see if others are interested in providing feedback. We'll revisit the issue after some time has passed to figure out whether to close it or take action.

Sound good?

from cookiecutter-data-science.

ricalanis avatar ricalanis commented on May 24, 2024

Sounds perfect! That way I will be able to test it more and more and have a more solid opinion of this and how it fits on the flow that the project proposes.

from cookiecutter-data-science.

SanchitAggarwal avatar SanchitAggarwal commented on May 24, 2024

Hi @MrOutis and @isms,

Just came across the directory structure and the issue. I guess @ricalanis made a point. Many times, you want your model to shift to the production environment and there you need an endpoint which can communicate with third party applications and adding /src/api folder in default structure make sense if I talk about my use case too.

from cookiecutter-data-science.

Related Issues (20)

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.