Tkinter Variable class C/Python garbage collection mismatch
Tkinter is going to drive me crazy.
Let me lay this out for you:
Tkinter is the GUI interface I am using, which is a python frontend for a C library
It holds "widgets" in a window.
Some widgets have variables (StringVar, BooleanVar, etc - not "variables" like code variables but a class of updatable data holders for the widgets to link to the Tcl backend)
The Vars have incremental names like PYVAR1, PYVAR93, etc by default.
Names can be provided to the Vars via keywords upon initialization. (Note I have not been able to find any reason to not do this - hence this post)
Names should absolutely not be provided to the Vars unless they are unique. Because on python garbage collection (or "del Var" command) the Vars are told to destroy() themselves and then this command is passed to C "destroy this Var."
But the garbage collection in C (or rather Tcl) is slightly delayed from Python...
So if I immediately I instantiate a different Var with a different value (or same value, who knows) but reusing the same name, the Var has been deleted in Python (yey!) but it has not been deleted in C yet (uh oh). C says to Python
/r/Python
https://redd.it/1ca1en9
Tkinter is going to drive me crazy.
Let me lay this out for you:
Tkinter is the GUI interface I am using, which is a python frontend for a C library
It holds "widgets" in a window.
Some widgets have variables (StringVar, BooleanVar, etc - not "variables" like code variables but a class of updatable data holders for the widgets to link to the Tcl backend)
The Vars have incremental names like PYVAR1, PYVAR93, etc by default.
Names can be provided to the Vars via keywords upon initialization. (Note I have not been able to find any reason to not do this - hence this post)
Names should absolutely not be provided to the Vars unless they are unique. Because on python garbage collection (or "del Var" command) the Vars are told to destroy() themselves and then this command is passed to C "destroy this Var."
But the garbage collection in C (or rather Tcl) is slightly delayed from Python...
So if I immediately I instantiate a different Var with a different value (or same value, who knows) but reusing the same name, the Var has been deleted in Python (yey!) but it has not been deleted in C yet (uh oh). C says to Python
/r/Python
https://redd.it/1ca1en9
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Retrieve flask form from Session.get( )
I would like a third-party application to access and edit a flask form that is embedded within a flask endpoint in order to make amendments to it and send the amended flask form via Session.post ( )?
More generally how does flask handle flask forms that are simple local variables within a flask endpoint and how can they be accessed via the python requests package?
/r/flask
https://redd.it/1ca6j2o
I would like a third-party application to access and edit a flask form that is embedded within a flask endpoint in order to make amendments to it and send the amended flask form via Session.post ( )?
More generally how does flask handle flask forms that are simple local variables within a flask endpoint and how can they be accessed via the python requests package?
/r/flask
https://redd.it/1ca6j2o
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
I made my first package (please review)
I've been learning Django on my own for about 3 years now and today I created a package that optimizes images by converting them to WebP. You can then display these images using a template tag.
The only support I've had during my coding journey is this community (thank you so much!) so I'd really appreciate it if you could provide some feedback. I have no idea what level my coding is on or if my style meets professional standards.
It is also my first time uploading something to Github and PyPi, as well as writing tests for Github Actions. Using your feedback, I'm hoping to make it good enough to show a potential employer someday.
https://github.com/peterstavrou/django-img-optimizer
/r/django
https://redd.it/1ca4vxn
I've been learning Django on my own for about 3 years now and today I created a package that optimizes images by converting them to WebP. You can then display these images using a template tag.
The only support I've had during my coding journey is this community (thank you so much!) so I'd really appreciate it if you could provide some feedback. I have no idea what level my coding is on or if my style meets professional standards.
It is also my first time uploading something to Github and PyPi, as well as writing tests for Github Actions. Using your feedback, I'm hoping to make it good enough to show a potential employer someday.
https://github.com/peterstavrou/django-img-optimizer
/r/django
https://redd.it/1ca4vxn
GitHub
GitHub - peterstavrou/django-img-optimizer: Image optimizer for Django.
Image optimizer for Django. Contribute to peterstavrou/django-img-optimizer development by creating an account on GitHub.
What is currently the fastest/state-of-the-art ODE solver in Python?
For my application, Scipy's solvers are not fast enough so I am looking to speed up by using another package. These are some packages I have found so far:
* [NumbaLSODA](https://github.com/Nicholaswogan/numbalsoda)
* [DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl)
* [Torchquad](https://github.com/esa/torchquad)
(Although doesn't solve ODEs, just integrates quickly, but that could be wrapped I guess)
* [Torchdiffeq](https://github.com/rtqichen/torchdiffeq)
* [PyDSTool](https://pydstool.github.io/PyDSTool/FrontPage.html)
I will be experimenting with these packages, but I was wondering whether anyone has experience with them and has done work on them before. Also, I am wondering whether there are any packages I should check out?
/r/Python
https://redd.it/1ca4bwy
For my application, Scipy's solvers are not fast enough so I am looking to speed up by using another package. These are some packages I have found so far:
* [NumbaLSODA](https://github.com/Nicholaswogan/numbalsoda)
* [DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl)
* [Torchquad](https://github.com/esa/torchquad)
(Although doesn't solve ODEs, just integrates quickly, but that could be wrapped I guess)
* [Torchdiffeq](https://github.com/rtqichen/torchdiffeq)
* [PyDSTool](https://pydstool.github.io/PyDSTool/FrontPage.html)
I will be experimenting with these packages, but I was wondering whether anyone has experience with them and has done work on them before. Also, I am wondering whether there are any packages I should check out?
/r/Python
https://redd.it/1ca4bwy
GitHub
GitHub - Nicholaswogan/numbalsoda: Python wrapper of LSODA (solving ODEs) which can be called from within numba functions.
Python wrapper of LSODA (solving ODEs) which can be called from within numba functions. - Nicholaswogan/numbalsoda
D Simple Questions Thread
Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!
Thread will stay alive until next one so keep posting after the date in the title.
Thanks to everyone for answering questions in the previous thread!
/r/MachineLearning
https://redd.it/1c9jy4b
Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!
Thread will stay alive until next one so keep posting after the date in the title.
Thanks to everyone for answering questions in the previous thread!
/r/MachineLearning
https://redd.it/1c9jy4b
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
Learn to use Websockets with Django by building your own ChatGPT
https://www.saaspegasus.com/guides/django-websockets-chatgpt-channels-htmx/
/r/djangolearning
https://redd.it/1cacvzw
https://www.saaspegasus.com/guides/django-websockets-chatgpt-channels-htmx/
/r/djangolearning
https://redd.it/1cacvzw
SaaS Pegasus
Learn to use Websockets with Django by building your own ChatGPT
Everything you need to know about websockets to use them in your applications, with Django, channels, and HTMX.
My falsk app works fine when running using launch.sh file locally but when i route the traffic via proxy ( nginx ), i get 504 Gateway Time-out.
My falsk app works fine when running using launch.sh file locally but when i route the traffic via proxy ( nginx ), i get 504 Gateway Time-out.
Here is my current nginx config
server {
listen 80;
listen :::80;
servername ;
location / {
return 301 https://$host$requesturi;
}
}
server {
listen 443 ssl;
sslprotocols TLSv1 TLSv1.1 TLSv1.2;
sslciphers HIGH:!aNULL:!MD5;
sslcertificate /etc/ssl/certs/example.com.pem;
/r/flask
https://redd.it/1cafuij
My falsk app works fine when running using launch.sh file locally but when i route the traffic via proxy ( nginx ), i get 504 Gateway Time-out.
Here is my current nginx config
server {
listen 80;
listen :::80;
servername ;
location / {
return 301 https://$host$requesturi;
}
}
server {
listen 443 ssl;
sslprotocols TLSv1 TLSv1.1 TLSv1.2;
sslciphers HIGH:!aNULL:!MD5;
sslcertificate /etc/ssl/certs/example.com.pem;
/r/flask
https://redd.it/1cafuij
Learn to use Websockets with Django by building your own ChatGPT
https://www.saaspegasus.com/guides/django-websockets-chatgpt-channels-htmx/
/r/django
https://redd.it/1cacqy3
https://www.saaspegasus.com/guides/django-websockets-chatgpt-channels-htmx/
/r/django
https://redd.it/1cacqy3
SaaS Pegasus
Learn to use Websockets with Django by building your own ChatGPT
Everything you need to know about websockets to use them in your applications, with Django, channels, and HTMX.
D Llama-3 may have just killed proprietary AI models
Full Blog Post
Meta released Llama-3 only three days ago, and it already feels like the inflection point when open source models finally closed the gap with proprietary models. The initial benchmarks show that Llama-3 70B comes pretty close to GPT-4 in many tasks:
The [official Meta page](https://llama.meta.com/llama3/) only shows that Llama-3 outperforms Gemini 1.5 and Claude Sonnet.
Artificial Analysis shows that Llama-3 is in-between Gemini-1.5 and Opus/GPT-4 for quality.
On [LMSYS Chatbot Arena Leaderboard](https://arena.lmsys.org/), Llama-3 is ranked #5 while current GPT-4 models and Claude Opus are still tied at #1.
The even more powerful Llama-3 400B+ model is still in training and is likely to surpass GPT-4 and Opus once released.
## Meta vs OpenAI
Some speculate that Meta's goal from the start was to target OpenAI with a ["scorched earth"](https://en.wikipedia.org/wiki/Scorched_earth) approach by releasing powerful open models to disrupt the competitive landscape and avoid being left behind in the AI race.
Meta can likely outspend OpenAI on compute and talent:
OpenAI makes an estimated revenue of $2B and is likely unprofitable. Meta generated a revenue of $134B and profits of $39B in 2023.
Meta's compute resources likely outrank OpenAI by now.
Open source likely attracts better talent and researchers.
One possible outcome could
/r/MachineLearning
https://redd.it/1cad7kk
Full Blog Post
Meta released Llama-3 only three days ago, and it already feels like the inflection point when open source models finally closed the gap with proprietary models. The initial benchmarks show that Llama-3 70B comes pretty close to GPT-4 in many tasks:
The [official Meta page](https://llama.meta.com/llama3/) only shows that Llama-3 outperforms Gemini 1.5 and Claude Sonnet.
Artificial Analysis shows that Llama-3 is in-between Gemini-1.5 and Opus/GPT-4 for quality.
On [LMSYS Chatbot Arena Leaderboard](https://arena.lmsys.org/), Llama-3 is ranked #5 while current GPT-4 models and Claude Opus are still tied at #1.
The even more powerful Llama-3 400B+ model is still in training and is likely to surpass GPT-4 and Opus once released.
## Meta vs OpenAI
Some speculate that Meta's goal from the start was to target OpenAI with a ["scorched earth"](https://en.wikipedia.org/wiki/Scorched_earth) approach by releasing powerful open models to disrupt the competitive landscape and avoid being left behind in the AI race.
Meta can likely outspend OpenAI on compute and talent:
OpenAI makes an estimated revenue of $2B and is likely unprofitable. Meta generated a revenue of $134B and profits of $39B in 2023.
Meta's compute resources likely outrank OpenAI by now.
Open source likely attracts better talent and researchers.
One possible outcome could
/r/MachineLearning
https://redd.it/1cad7kk
Kadoa
Llama 3.2 may have just killed proprietary AI models
Meta's release of Llama 3.2 marks a turning point where open-source AI models match and even surpass proprietary models.
Tuesday Daily Thread: Advanced questions
# Weekly Wednesday Thread: Advanced Questions 🐍
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/1caq9bh
# Weekly Wednesday Thread: Advanced Questions 🐍
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/1caq9bh
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
What is the best service/platform to help monetize my APIs & cut development time?
I've developed several APIs with Python’s FastAPI and deployed them on Google App Engine. I aim to monetize these through a website that allows user registration, subscription to paid plans, and API usage. I need functionalities like user accounts, admin dashboard, subscription management, and an API gateway with features like key generation and rate limiting. What tools are available to minimize coding for these standard components?
/r/flask
https://redd.it/1caru2m
I've developed several APIs with Python’s FastAPI and deployed them on Google App Engine. I aim to monetize these through a website that allows user registration, subscription to paid plans, and API usage. I need functionalities like user accounts, admin dashboard, subscription management, and an API gateway with features like key generation and rate limiting. What tools are available to minimize coding for these standard components?
/r/flask
https://redd.it/1caru2m
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
I now know again why I stopped using mamba / conda for setting up virtual environments
I have started at a new job and had the idea that it would probably be clever to set up my developing environment in exactly the same way as my predecessor did. Because:
1. This should help resolving errors quicker in the transition period
2. His code was good and clean and it appears that he knows what he is doing
3. we were using mostly the same tools (VScode etc.) anyways.
He set up his virtual environments (VE)s with conda/mamba. I vaguely remembered that I also used to do that but then stopped for some reason and switched to the virtualenv package. But I did not remember why anymore. So I just set up my VEs in the same way, it should not really make any difference anyways (so I thought). Well, fast forward about two weeks and now I have VEs that occasionally (but not always) exist twice in the same folders under the same name (according to mamba info --envs) and that are at the same time completely empty (according to mamba list) and contain all packages I have installed anywhere, ever (according to pip list). I usually install packages via pip and I assume this may have fucked things up
/r/Python
https://redd.it/1caflkr
I have started at a new job and had the idea that it would probably be clever to set up my developing environment in exactly the same way as my predecessor did. Because:
1. This should help resolving errors quicker in the transition period
2. His code was good and clean and it appears that he knows what he is doing
3. we were using mostly the same tools (VScode etc.) anyways.
He set up his virtual environments (VE)s with conda/mamba. I vaguely remembered that I also used to do that but then stopped for some reason and switched to the virtualenv package. But I did not remember why anymore. So I just set up my VEs in the same way, it should not really make any difference anyways (so I thought). Well, fast forward about two weeks and now I have VEs that occasionally (but not always) exist twice in the same folders under the same name (according to mamba info --envs) and that are at the same time completely empty (according to mamba list) and contain all packages I have installed anywhere, ever (according to pip list). I usually install packages via pip and I assume this may have fucked things up
/r/Python
https://redd.it/1caflkr
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
[D] Phi-3 to be released soon
Heard from two independent sources at MSFT (one close to Sebastien Bubeck) about the upcoming Phi-3 models:
* Three different sized models (up to 14B)
* Again, mostly synthetic and LLM-augmented training data
* Apparently some upscaling techniques on the training side
* No more Apache 2 but more restrictive license (similar to llama3)
* Mixtral level performance with much fewer parameters
I wanted to see if anyone has more insider information about the models.
/r/MachineLearning
https://redd.it/1cartvg
Heard from two independent sources at MSFT (one close to Sebastien Bubeck) about the upcoming Phi-3 models:
* Three different sized models (up to 14B)
* Again, mostly synthetic and LLM-augmented training data
* Apparently some upscaling techniques on the training side
* No more Apache 2 but more restrictive license (similar to llama3)
* Mixtral level performance with much fewer parameters
I wanted to see if anyone has more insider information about the models.
/r/MachineLearning
https://redd.it/1cartvg
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
Free platforms to deploy my flask+react app?
I built a data analytics web app using flask BE, react FE, and postgresql database to store all the data that users will analyze. I want to get out an MVP for as little cost as possible (I don't have much disposable funds right now) and was wondering if y'all had recommendations for free (or lowest cost) platforms to use? Heroku seems to have discontinued their free tier :( I was also checking out Cyclic but their docs seem to say they only support a single db table which would not serve my app's needs. I'm not too concerned about scalability right now since I just want to get out an MVP to start pitching investors and raising funds. Once those funds are (hopefully) raised, then I'll have more resources to pay for a more scalable platform. Right now I just need a platform that supports flask + react stack, auth, and at least 10-20 db tables in postgresql. Any recs would be greatly appreciated! Thanks!
/r/flask
https://redd.it/1caniyx
I built a data analytics web app using flask BE, react FE, and postgresql database to store all the data that users will analyze. I want to get out an MVP for as little cost as possible (I don't have much disposable funds right now) and was wondering if y'all had recommendations for free (or lowest cost) platforms to use? Heroku seems to have discontinued their free tier :( I was also checking out Cyclic but their docs seem to say they only support a single db table which would not serve my app's needs. I'm not too concerned about scalability right now since I just want to get out an MVP to start pitching investors and raising funds. Once those funds are (hopefully) raised, then I'll have more resources to pay for a more scalable platform. Right now I just need a platform that supports flask + react stack, auth, and at least 10-20 db tables in postgresql. Any recs would be greatly appreciated! Thanks!
/r/flask
https://redd.it/1caniyx
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Using SSE vs Web-sockets
Hello all,
I'm creating an app where I'll be sharing data from the server, there will not many client requests for data, what I'm thinking to use is SSE, because there's no need client operation required or payload required, only thing is I have to identify which user sending the request(if you have suggestions for identifying users over SSE, please share).
Using SSE or Web sockets, I'm confused because I've never tested any of one in production neither used much, also there will be about 83-147 MB data will be sent from the server to client every 2 to 3 hour average, and simultaneously almost 500 users will be connected to the server.
The confusion is which will be more memory efficient, which will have less CPU load and if there are any other solution which can handle more than 500 simultaneous connections which requires not that much memory, and not much CPU load, I'm not looking for a cheap product or like that but the thing is Performance and speed with low memory consumption and low CPU usage is
/r/flask
https://redd.it/1cayel1
Hello all,
I'm creating an app where I'll be sharing data from the server, there will not many client requests for data, what I'm thinking to use is SSE, because there's no need client operation required or payload required, only thing is I have to identify which user sending the request(if you have suggestions for identifying users over SSE, please share).
Using SSE or Web sockets, I'm confused because I've never tested any of one in production neither used much, also there will be about 83-147 MB data will be sent from the server to client every 2 to 3 hour average, and simultaneously almost 500 users will be connected to the server.
The confusion is which will be more memory efficient, which will have less CPU load and if there are any other solution which can handle more than 500 simultaneous connections which requires not that much memory, and not much CPU load, I'm not looking for a cheap product or like that but the thing is Performance and speed with low memory consumption and low CPU usage is
/r/flask
https://redd.it/1cayel1
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
GoDaddy/Outlook contact us form
Hello, I recently signed up for GoDaddy and Microsoft 365 Email Essentials. I'm trying to make a contact us form. I have turned on SMTP and made setup MFA so I can make a app password. It worked when I was using gmail's SMTP. I can also send a email out to a user, but when I make it so that a user tries to send a email to me via the contact form I get:
(554, b'5.2.252 SendAsDenied; [myemail@email.com](mailto:myemail@email.com) not allowed to send [client@mail.com](mailto:client@mail.com); STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message \[BeginDiagnosticData\]Cannot submit message.
My code is:
@app.route('/submit_contact_form', methods=['POST'])
def submit_contact_form():
name = request.form['name']
email = request.form['email']
subject = request.form['subject']
message = request.form['message']
msg = Message(subject=subject, sender=email, recipients=['myemail@email.com'])
msg.body = f"Name: {name}\nEmail: {email}\nMessage: {message}"
try:
mail.send(msg)
message_sent = True
/r/flask
https://redd.it/1cb1hcy
Hello, I recently signed up for GoDaddy and Microsoft 365 Email Essentials. I'm trying to make a contact us form. I have turned on SMTP and made setup MFA so I can make a app password. It worked when I was using gmail's SMTP. I can also send a email out to a user, but when I make it so that a user tries to send a email to me via the contact form I get:
(554, b'5.2.252 SendAsDenied; [myemail@email.com](mailto:myemail@email.com) not allowed to send [client@mail.com](mailto:client@mail.com); STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message \[BeginDiagnosticData\]Cannot submit message.
My code is:
@app.route('/submit_contact_form', methods=['POST'])
def submit_contact_form():
name = request.form['name']
email = request.form['email']
subject = request.form['subject']
message = request.form['message']
msg = Message(subject=subject, sender=email, recipients=['myemail@email.com'])
msg.body = f"Name: {name}\nEmail: {email}\nMessage: {message}"
try:
mail.send(msg)
message_sent = True
/r/flask
https://redd.it/1cb1hcy
Reddit
GoDaddy/Outlook contact us form : r/flask
86K subscribers in the flask community. Flask is a Python micro-framework for web development. Flask is easy to get started with and a great way to…
Async on OpenAI response
Hey guys. I have a function and a route that gets some response from openai and posts it to the website. It takes alot of time. How can I implement async processing on it to take multiple tasks at once and be faster. I've researched on this but it is quite confusing. Whats the difference b/w AsyncIO and Redis RQ / Celery. Any good resource would help.
/r/flask
https://redd.it/1cb38k8
Hey guys. I have a function and a route that gets some response from openai and posts it to the website. It takes alot of time. How can I implement async processing on it to take multiple tasks at once and be faster. I've researched on this but it is quite confusing. Whats the difference b/w AsyncIO and Redis RQ / Celery. Any good resource would help.
/r/flask
https://redd.it/1cb38k8
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Seeking Feedback on My First Django Web App. What are the next steps?
Hello everyone,
I’m excited to share my first web app, StreetTreasure, which I’ve developed as part of a class project. I had some experience in Python, so I chose Django for this project. It’s been a week since I started, and I’ve managed to implement the basic functionalities.
The inspiration for StreetTreasure came from observing the waste of perfectly good items, like furniture and electronics, that people often leave on the street before city garbage collections. With some interviews, we learned that selling these items on platforms like FB Marketplace or Craigslist, or even donating them, can be time-consuming. So, I created StreetTreasure to help people easily find usable items in their neighborhoods.
Here’s how it works: Registered users can anonymously post a picture of the item they’re discarding. Our app then maps the picture based on the EXIF info with a timestamp. So far, I’ve implemented:
1. User registration and authentication
2. Post information management using an SQL database
3. Conversion of GPS data to geo-coordinates from EXIF
The prototype is currently deployed on a free PythonAnywhere account. If you’re interested in trying it out, you can access it here.
https://crystalflare335.pythonanywhere.com/
Looking ahead, if the app gains traction, we’re considering implementing the following features:
1. Improved
/r/djangolearning
https://redd.it/1caw5et
Hello everyone,
I’m excited to share my first web app, StreetTreasure, which I’ve developed as part of a class project. I had some experience in Python, so I chose Django for this project. It’s been a week since I started, and I’ve managed to implement the basic functionalities.
The inspiration for StreetTreasure came from observing the waste of perfectly good items, like furniture and electronics, that people often leave on the street before city garbage collections. With some interviews, we learned that selling these items on platforms like FB Marketplace or Craigslist, or even donating them, can be time-consuming. So, I created StreetTreasure to help people easily find usable items in their neighborhoods.
Here’s how it works: Registered users can anonymously post a picture of the item they’re discarding. Our app then maps the picture based on the EXIF info with a timestamp. So far, I’ve implemented:
1. User registration and authentication
2. Post information management using an SQL database
3. Conversion of GPS data to geo-coordinates from EXIF
The prototype is currently deployed on a free PythonAnywhere account. If you’re interested in trying it out, you can access it here.
https://crystalflare335.pythonanywhere.com/
Looking ahead, if the app gains traction, we’re considering implementing the following features:
1. Improved
/r/djangolearning
https://redd.it/1caw5et
Having trouble getting flask to run.
Hi
I'm having trouble getting Flask to work. Here's some background and where the problem is:
\- I'm new to python but I've programmed in other langagues.
\- I'm on a Windows 10 Pro laptop.
\-- I'm following this youtube tutorial: "Python for Web Development – Crash Course [API, SQL Databases, Virtual Environment, Flask, Django\]"
Everything has been going fine and I was excited to get into the web app section. At the 52 minute mark, he starts the section labeled "Flask Setup". Here's what I did:
\- Following his instructions, I installed Flask using:
pip install flask
\- It installed without errors.
\- Next he says to create a virtual enviornment for a new project. So I did the following:
python -m venv webBookmarks
("webBookmarks" is the name of hte project I want to work on.)
\- I actived it using:
webBookmarks\\scripts\\activate
\- I'm now in the 'webBookmarks' VM as shown in the format of the command prompt:
(webBookmarks) c:\\Clem\\python\\Virtual environments\\webBookmarks>
\- Next, he says to use this command:
(webBookmarks) c:\\Clem\\python\\Virtual environments\\webBookmarks>FLASK_APP=app.py
\- When I issue that command, I get the following error:
* 'FLASK_APP' is not recognized as an internal or external command, operable program or
/r/flask
https://redd.it/1cb5daf
Hi
I'm having trouble getting Flask to work. Here's some background and where the problem is:
\- I'm new to python but I've programmed in other langagues.
\- I'm on a Windows 10 Pro laptop.
\-- I'm following this youtube tutorial: "Python for Web Development – Crash Course [API, SQL Databases, Virtual Environment, Flask, Django\]"
Everything has been going fine and I was excited to get into the web app section. At the 52 minute mark, he starts the section labeled "Flask Setup". Here's what I did:
\- Following his instructions, I installed Flask using:
pip install flask
\- It installed without errors.
\- Next he says to create a virtual enviornment for a new project. So I did the following:
python -m venv webBookmarks
("webBookmarks" is the name of hte project I want to work on.)
\- I actived it using:
webBookmarks\\scripts\\activate
\- I'm now in the 'webBookmarks' VM as shown in the format of the command prompt:
(webBookmarks) c:\\Clem\\python\\Virtual environments\\webBookmarks>
\- Next, he says to use this command:
(webBookmarks) c:\\Clem\\python\\Virtual environments\\webBookmarks>FLASK_APP=app.py
\- When I issue that command, I get the following error:
* 'FLASK_APP' is not recognized as an internal or external command, operable program or
/r/flask
https://redd.it/1cb5daf
Reddit
From the flask community on Reddit
Explore this post and more from the flask community