Comments (8)
Closing but still open to hearing more about this if people have specific improvement proposals.
from cookiecutter-data-science.
@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.
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:
- Make raw and intermediate data available in an endpoint
- 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.
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.
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.
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.
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.
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)
- pip 2020 resolver no longer valid HOT 1
- Fix v2 aws sync commands
- import urllib3 raise ImportError(ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+) HOT 2
- Repeated package installations HOT 2
- Create a V2 screencast HOT 1
- Transfer ownership from drivendata user to drivendataorg organization HOT 1
- Add Windows to V2 CI HOT 1
- Add CI for releasing package to PyPI
- Add documentation about major changes between V1 and V2 HOT 1
- Update the opinions section HOT 3
- Add option to include nbautoexport
- Support user-supplied config files
- Improve the quality of the boilerplate python code HOT 1
- Switch from sphinx as default project docs to mkdocs
- Add Python 3.12 support HOT 4
- More documentation for newcomers
- Dry run of ownership transfer HOT 2
- Announce v2 release HOT 1
- add documentation for running make on Windows HOT 8
- Make v1 template docs accessible in new docs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookiecutter-data-science.