Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running locally #28

Open
codeinabox opened this issue Nov 30, 2023 · 7 comments
Open

Running locally #28

codeinabox opened this issue Nov 30, 2023 · 7 comments

Comments

@codeinabox
Copy link
Contributor

I can't find any documentation for running it locally. Does one need a Deta Space developer account for this?

@berrysauce
Copy link
Owner

You can start the FastAPI server locally by running the main.py file and you can seperately start the SvelteKit app located in the ui Folder. Don't forget to install all required packages from the requirements.txt file.

@codeinabox
Copy link
Contributor Author

Thank you, I'll raise a PR to update the docs with this information. I could create a Makefile for running locally if you fancy

@codeinabox
Copy link
Contributor Author

Also, I'm getting the following error:

Traceback (most recent call last):
File "/Users/mathew/Documents/workspace/opensource/ingredients/main.py", line 12, in
import ingredients
File "/Users/mathew/Documents/workspace/opensource/ingredients/ingredients.py", line 8, in
deta = Deta()
File "/opt/homebrew/lib/python3.9/site-packages/deta/init.py", line 38, in init
project_key, project_id = _get_project_key_id(project_key, project_id)
File "/opt/homebrew/lib/python3.9/site-packages/deta/utils.py", line 8, in _get_project_key_id
raise AssertionError("No project key defined")
AssertionError: No project key defined

@berrysauce
Copy link
Owner

Oh you might need a Deta account after all. Maybe the Deta CLI with local execution should work

@codeinabox
Copy link
Contributor Author

Is it easy enough to request a Deta Space account or is there quite a bit of vetting?

@berrysauce
Copy link
Owner

I think you can just sign up at https://deta.space

@mbaraa
Copy link

mbaraa commented Dec 14, 2023

@codeinabox you can remove every "deta" related thing (caching and db) and the api will run locally with no problems whatsoever!

they only exist in main.py and ingredients.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants