Git Product home page Git Product logo

dash-tools's Introduction

Create, Run and Deploy Plotly Dash Apps from Terminal

GitHub | Pypi | Downloads | License

DashTools is an open-source command line toolchain for Plotly Dash that makes creating and deploying dash projects to Heroku intuitive and easy.

Use dashtools to...

  • Create templated dash apps with one command
  • Deploy your app to Heroku and Render.com in under a minute
  • Generate Procfile, requirements.txt and runtime.txt automatically on deploy
  • Many boilerplate templates for creating apps
  • Dockerize your app in a single step

Get started

Install with:

pip install dash-tools

Run the dashboard with:

dashtools gui

Create projects with:

dashtools init <app name>

dash-tools's People

Contributors

andrew-hossack avatar jasonwashburn avatar lanchuhuong avatar lgtm-com[bot] avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dash-tools's Issues

[Feature Request] deploy to another service besides heroku since free tier is no longer available

Thanks so much for dash-tools!

Is your feature request related to a problem? Please describe.
Based on the post by Heroku on their blog, it will no longer be possible to have a free account. I would like to request information on how I could deploy to another free site, if there are any. I'm open to any suggestions, but perhaps netlify would work.

Describe the solution you'd like
Again, a possible solution is to deploy to netlify.

Describe alternatives you've considered
I"m not aware of any working alternatives than to pay for Heroku.

Additional context
n/a

[Feature Request] Deploying a dash app with GIFs

Is your feature request related to a problem? Please describe.
I work with video datasets and I don't know about a good way of deploying videos/gifs using dash. I am using dash-gif-component for creating a dash app with GIFs and I tried dash-tools advanced template. The app was working locally but the path was broken when deployed on Heroku.

Is there a way to deploy a GIF app to Heroku?

Additional context
Add any other context or screenshots about the feature request here.

[Feature Request] Change created Dockerfiles to use a non-root user.

Is your feature request related to a problem? Please describe.
Dockerfiles generated by dashtools docker --init default to the base image default user (in this case root). Best practice is to run container processes as a non-root user.

Describe the solution you'd like
Update the process that generates Dockerfiles to create and use a non-root user.

Describe alternatives you've considered
Alternative would be to continue running as root user, but this is not advised and is also easy to prevent.

I will submit a PR to fix this Issue shortly.

[Feature Request] README - Add section for using --deploy on existing dash application

@Coding-with-Adam what are your thoughts on adding a section to the README for deploying an existing dash app? Eg. If I already have a working app, what steps should I take to deploy it?

Example A and B in README are great, but use dashtools --init to create the app. I might like to see a section that explains how to upload my existing app:

  1. Make sure app.py is in src directory
  2. Make sure to include server=app.server

Do you think having another example for this would be good?

[Feature Request] Create better dash-iconify and dmc template(s)

Moving snehilvj/dash-iconify#1 to dash-tools issue.


Hi @andrew-hossack, I came across your project sometime back and I like what you are doing. Thanks for including dmc and dash iconify.

dash-iconify : I am not sure if a standalone template which uses just dash-iconify makes sense. It's more like a utility. But let me know your thoughts.
dmc : If you are willing, I can come up with more examples to address the following using dmc:

  • side nav bar
  • dark theme
  • dmc with dash-iconify
  • responsive top navigation
  • any other use case you can think of

PS: We can move this issue to dash-tools if you prefer that.

[BUG] requirements.txt error

When running the dashtools heroku --deploy, I constantly get this error

dashtools: Required file requirements.txt not found. Create one automatically? dashtools: Continue? (y/n) > y dashtools: Creating requirements.txt Usage: pipreqs [options] [<path>] dashtools: Error creating requirements.txt dashtools: Are you in a valid dash app directory? dashtools: Exiting

I'm on windows. I'm not using a virtual environment so I think that has something to do with it?

I've even made the requirements.txt file myself and still get that error.

Could be because I'm multiple pages as well.

Maybe my folder setup is wrong?

image

[Feature Request] local run command with restart

When I develop Dash apps, I almost always run them with while true; do python app.py; sleep 1; done such that if, while I'm typing, I save a file with, say, a syntax error, I can just glance at the console, see the error, fix it and save the file again and the app reboots. If I don't do this, the first syntax error crashes the app and I need to switch to my terminal and re-execute python app.py.

So the feature request is a command like dashtools run (which does the equivalent of python app.py) and dashtools run --restart (which does the equivalent of my restart loop, perhaps with a numeric argument for how many seconds to wait or something).

dashtools could do some cool stuff like parse the output and apply nice colors, or even parse the output and notice that it's the same as the last crash and just increment a counter saying "app crashed N times with the error above" or whatever, to make it a nicer developer experience.

[BUG] GUI redirects me to invalid url

Describe your context
I am trying to host my dash app on render. I can go through the gui checklist but when I hip deploy to render it redirects me to render and I see the following message
image

  • replace the result of dash-tools --version below
dashtools 1.10.1

  • please tell us what operating system you are using
linux POPos

Describe the bug

It seems to me that there is some path concatenation that is not working correctly and in quickly scanning your repository I believe that on line 27 of deployPage.py is where this is occurring.
When looking at my github i see that dashtools is successfully pushing to my github repo(DashTool Automatic Push - 10/25/2022 @ 9:01:44)

I created a pull request that might work. Not sure what else uses that function though

Expected behavior

I expect it to push to render

Thanks for your work this is a great repo

Closing the `dashtools gui` with Ctrl + C does not gracefully shut down

Current behavior:

> dashtools gui
dashtools: Dashboard started on http://127.0.0.1:8050/
dashtools: Press Ctrl+C to stop
^CException ignored in: <module 'threading' from '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py'>
Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 1448, in _shutdown
    lock.acquire()
KeyboardInterrupt: 

AC:

  • Handle thread exit gracefully

[BUG] Heroku updated their default support python

Hi Andrew, a simple one:

Log from Heroku:


-----> Building on the Heroku-22 stack
-----> Using buildpack: heroku/python
-----> Python app detected
-----> Using Python version specified in runtime.txt
 !     Requested runtime 'python-3.8.10' is not available for this stack (heroku-22).
 !     For supported versions, see: https://devcenter.heroku.com/articles/python-support
 !     Push rejected, failed to compile Python app.
 !     Push failed

And new heroku supported python versions: https://devcenter.heroku.com/articles/python-support

"By default, newly created Python apps use the python-3.10.7 runtime. You can also specify a different supported Python version."

That's it, thanks!

kev

[BUG] dashtools heroku --update error

Error creating requirements.txt with a cp950 undecode error(I examine and there isn't any cp950 syntax in file)"while running "dashtools heroku --deploy"

[BUG] Long Callbacks Error w/ `dashtools gui`

Thank you so much for helping improve the quality of dash-tools!

We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.

Describe your context

  • replace the result of dash-tools --version below
1.10.3
  • please tell us what operating system you are using
mac & windows

Describe the bug

Error message about long callbacks requiring celery manger or disk cache when dashtools gui is started. Seems to be related to new version of Dash.

Expected behavior

No error message

Screenshots

If applicable, add screenshots or screen recording to help explain your problem.

missing file in requirements file

Bug reported in a Youtube message on August 14, 2022, on the Charming Data channel in this video.

Form @1DS20CS083 _Harsha S:
@andrew H OMG aren't you the guy who made this? Thank you so much fam. It used to take a hour to upload stuff before, now it takes like a few minutes :D, thank you kind sir

P.s. there is a small error when I use pymongo in the project, it needs dnspython module to work. When I deploy the app in the requirements file, it only has the pymongo module but ignores the dnspython module so the website doesn't work. I fixed this issue easily by adding the dnspython module in the requirements file but I thought I would let you know.

[BUG]

Thank you so much for helping improve the quality of dash-tools!

We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.

Describe your context
Please provide us your environment, so we can easily reproduce the issue.

  • replace the result of dash-tools --version below
1.2.1
  • please tell us what operating system you are using
MAC OS  Monteray 12.4

Describe the bug

Brew installer doesn't set up path variable, not clear where executable is to invoke the dash-tools command is so as to add it to the Path.

installed a file tree at
/Users/alvelda/anaconda/envs/python38/lib/python3.8/site-packages

where's the executable?

Expected behavior

A clear and concise description of what you expected to happen.

I would have expected the path variable to be updated by the installation script.

If applicable, add screenshots or screen recording to help explain your problem.

[BUG] Application error

Thank you so much for helping improve the quality of dash-tools!

We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.

Describe your context
I deployed a multipage app with dashtools but it keep showing application error
Please provide us your environment, so we can easily reproduce the issue.

  • replace the result of dash-tools --version below
1.2
  • please tell us what operating system you are using
[e.g. mac]

Describe the bug

A clear and concise description of what the bug is.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots or screen recording to help explain your problem.

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.