NFL Odds API
Looking for a good source for nfl odds & scores. I’ve played a bit with scraping this data but everytime i think i have a decent solution there are big gaps in data or a total redesign of the site(s). I’m definitely price sensitive but i am willing to pay if there were a decent rest api that would give me each game’s home team, away team, date, score, spread, and o/u. If anyone knows of a good one, i’ll be forever grateful
/r/Python
https://redd.it/18d9v73
Looking for a good source for nfl odds & scores. I’ve played a bit with scraping this data but everytime i think i have a decent solution there are big gaps in data or a total redesign of the site(s). I’m definitely price sensitive but i am willing to pay if there were a decent rest api that would give me each game’s home team, away team, date, score, spread, and o/u. If anyone knows of a good one, i’ll be forever grateful
/r/Python
https://redd.it/18d9v73
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Run migration on specific schema
Hi everyone, is there any option to run migrations on specified schema i want to have same database tables as in default public schema but in my own custom schema. I'm using PostgreSQL thanks in advance.
/r/django
https://redd.it/18dkz55
Hi everyone, is there any option to run migrations on specified schema i want to have same database tables as in default public schema but in my own custom schema. I'm using PostgreSQL thanks in advance.
/r/django
https://redd.it/18dkz55
Reddit
From the django community on Reddit
Explore this post and more from the django community
share - Download resources from YouTube, Facebook, and Bilibili - web crawler for iiilab.com's API
see Github: https://github.com/1kuzus/iiiLabCrawler
https://preview.redd.it/85gff7j6v15c1.png?width=997&format=png&auto=webp&s=c752f05893361065d92b64581a8215cd0430cf1b
/r/Python
https://redd.it/18dk5oz
see Github: https://github.com/1kuzus/iiiLabCrawler
https://preview.redd.it/85gff7j6v15c1.png?width=997&format=png&auto=webp&s=c752f05893361065d92b64581a8215cd0430cf1b
/r/Python
https://redd.it/18dk5oz
GitHub
GitHub - 1kuzus/iiiLabCrawler: Download resources from YouTube, Facebook, and Bilibili - web crawler for iiilab.com's API
Download resources from YouTube, Facebook, and Bilibili - web crawler for iiilab.com's API - 1kuzus/iiiLabCrawler
Made a Python script to get your Spotify stats
I wrote a Python script while I was playing with the Spotify API which can get your Spotify Stats :)
​
Repository Link : https://github.com/ni5arga/spotify-stats-python
Feel free to star and fork!
/r/Python
https://redd.it/18dscdi
I wrote a Python script while I was playing with the Spotify API which can get your Spotify Stats :)
​
Repository Link : https://github.com/ni5arga/spotify-stats-python
Feel free to star and fork!
/r/Python
https://redd.it/18dscdi
The Python on Microcontrollers Newsletter, a free weekly news and project resource, please subscribe
​
https://preview.redd.it/41ir56yu235c1.jpg?width=503&format=pjpg&auto=webp&s=55dbf7fb7ea7aca981e7666a190f330b00575716
With the Python on Microcontrollers newsletter, you get all the latest information on Python running on hardware in one place! MicroPython, CircuitPython and Python on single Board Computers like Raspberry Pi & many more.
The Python on Microcontrollers newsletter is the place for the latest news. It arrives Monday morning with all the week’s happenings. No advertising, no spam, easy to unsubscribe.
10,673 subscribers - the largest Python on hardware newsletter out there.
Catch all the weekly news on **Python for Microcontrollers** with adafruitdaily.com.
>This ad-free, spam-free weekly email is filled with CircuitPython, MicroPython, and Python information that you may have missed, all in one place!
You get a summary of all the software, events, projects, and the latest hardware worldwide once a week, no ads!
Ensure you catch the weekly Python on Hardware roundup– you can cancel anytime – **try our spam-free newsletter today**!
**https://www.adafruitdaily.com/**
/r/Python
https://redd.it/18dodr9
​
https://preview.redd.it/41ir56yu235c1.jpg?width=503&format=pjpg&auto=webp&s=55dbf7fb7ea7aca981e7666a190f330b00575716
With the Python on Microcontrollers newsletter, you get all the latest information on Python running on hardware in one place! MicroPython, CircuitPython and Python on single Board Computers like Raspberry Pi & many more.
The Python on Microcontrollers newsletter is the place for the latest news. It arrives Monday morning with all the week’s happenings. No advertising, no spam, easy to unsubscribe.
10,673 subscribers - the largest Python on hardware newsletter out there.
Catch all the weekly news on **Python for Microcontrollers** with adafruitdaily.com.
>This ad-free, spam-free weekly email is filled with CircuitPython, MicroPython, and Python information that you may have missed, all in one place!
You get a summary of all the software, events, projects, and the latest hardware worldwide once a week, no ads!
Ensure you catch the weekly Python on Hardware roundup– you can cancel anytime – **try our spam-free newsletter today**!
**https://www.adafruitdaily.com/**
/r/Python
https://redd.it/18dodr9
TIL The backend of Meta Threads is built with Python 3.10
https://twitter.com/llanga/status/1676846870520291329
/r/Python
https://redd.it/18dvsl9
https://twitter.com/llanga/status/1676846870520291329
/r/Python
https://redd.it/18dvsl9
X (formerly Twitter)
Łukasz Langa (@llanga) on X
Did you know that the backend of #MetaThreads is built with #Python 3.10?
It's running on Instagram's #Cinder fork that includes a JIT, lazy-loaded modules, pre-compiled static modules, and a bunch of other interesting tweaks against vanilla Python 3.10.…
It's running on Instagram's #Cinder fork that includes a JIT, lazy-loaded modules, pre-compiled static modules, and a bunch of other interesting tweaks against vanilla Python 3.10.…
Understanding TTFB Latency in DJango - Seems absurdly slow after DB optimizations even locally
Hello
Our team has been undergoing optimizing our Django DRF / Graphene stack for latency we can't quite understand the source of our slowdowns
Our Stack:
Python 3.11
Django 4.2.8
DRF 3.14.0
Django Graphene 3.1.5
We've done the 'basic' optimizations of
implementing prefetch / select related
removed all n+1 generated SQL queries
And of course, scrounged the internet looking for answers, and saw the ModelSerializer issue posted here: https://hakibenita.com/django-rest-framework-slow
Which as I understand it is 'mostly' fixed in the latest Django?
We've manually optimized our QuerySets . SQL, and got our worst case SQL latency is around 200ms, most in the 10-100 range.
However, our TTFB, is anywhere from 1 to 3 seconds as measured in dev tools on a browser performing a graphiQL query, as well as in our test suites
Here are some numbers from GraphiQL Console:
One GQL QUery generates 6 optimzied SQL Queries resulting in a response of a 1.4 MB JSon file which has a heavy amount of nested of elements (necessary for our workload)
Django Debug Toolbar numbers:
101.9ms for SQL access
Chrome Dev Tools
6 SQL Querues 56.44 ms (not sure how it knows this?)
44us to send request
937 ms waiting for server response
8.48 ms to download
Total \~1 second for a
/r/django
https://redd.it/18dszpy
Hello
Our team has been undergoing optimizing our Django DRF / Graphene stack for latency we can't quite understand the source of our slowdowns
Our Stack:
Python 3.11
Django 4.2.8
DRF 3.14.0
Django Graphene 3.1.5
We've done the 'basic' optimizations of
implementing prefetch / select related
removed all n+1 generated SQL queries
And of course, scrounged the internet looking for answers, and saw the ModelSerializer issue posted here: https://hakibenita.com/django-rest-framework-slow
Which as I understand it is 'mostly' fixed in the latest Django?
We've manually optimized our QuerySets . SQL, and got our worst case SQL latency is around 200ms, most in the 10-100 range.
However, our TTFB, is anywhere from 1 to 3 seconds as measured in dev tools on a browser performing a graphiQL query, as well as in our test suites
Here are some numbers from GraphiQL Console:
One GQL QUery generates 6 optimzied SQL Queries resulting in a response of a 1.4 MB JSon file which has a heavy amount of nested of elements (necessary for our workload)
Django Debug Toolbar numbers:
101.9ms for SQL access
Chrome Dev Tools
6 SQL Querues 56.44 ms (not sure how it knows this?)
44us to send request
937 ms waiting for server response
8.48 ms to download
Total \~1 second for a
/r/django
https://redd.it/18dszpy
Hakibenita
Improve Serialization Performance in Django Rest Framework
How we reduced serialization time by 99%!
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/18e0fjt
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/18e0fjt
YouTube
Data Structures and Algorithms in Python - Full Course for Beginners
A beginner-friendly introduction to common data structures (linked lists, stacks, queues, graphs) and algorithms (search, sorting, recursion, dynamic programming) in Python. This course will help you prepare for coding interviews and assessments.
🔗 Course…
🔗 Course…
Flask-Gravatar
Is Flask-Gravatar not compatible with Flask 3.0??
I am just importing it and it throws me this error--
ImportError: cannot import name '_request_ctx_stack' from 'flask' (C:\\Users\\pc\\OneDrive\\Documents\\Python Projects\\Blog Website - Final Product\\venv\\Lib\\site-packages\\flask\\__init__.py)
Are there any workarounds to this problem??
​
/r/flask
https://redd.it/18dwkly
Is Flask-Gravatar not compatible with Flask 3.0??
I am just importing it and it throws me this error--
ImportError: cannot import name '_request_ctx_stack' from 'flask' (C:\\Users\\pc\\OneDrive\\Documents\\Python Projects\\Blog Website - Final Product\\venv\\Lib\\site-packages\\flask\\__init__.py)
Are there any workarounds to this problem??
​
/r/flask
https://redd.it/18dwkly
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
The Dawn of Concurrency and Parallelism: Python 3.12 Starts to Support a Per-Interpreter GIL
> PEP 684 introduces a per-interpreter GIL, so that sub-interpreters may now be created with a unique GIL per interpreter. This allows Python programs to take full advantage of multiple CPU cores. This is currently only available through the C-API, though a Python API is anticipated for 3.13.
## Summary
- Per-interpreter GIL with C-API is available in Python 3.12
- Python API is anticipated for Python 3.13
## References
- A Per-Interpreter GIL section in _What’s New In Python 3.12_
- PEP 686: A Per-Interpreter GIL
- PEP 734: Multiple Interpreters in the Stdlib
/r/Python
https://redd.it/18e0q7p
> PEP 684 introduces a per-interpreter GIL, so that sub-interpreters may now be created with a unique GIL per interpreter. This allows Python programs to take full advantage of multiple CPU cores. This is currently only available through the C-API, though a Python API is anticipated for 3.13.
## Summary
- Per-interpreter GIL with C-API is available in Python 3.12
- Python API is anticipated for Python 3.13
## References
- A Per-Interpreter GIL section in _What’s New In Python 3.12_
- PEP 686: A Per-Interpreter GIL
- PEP 734: Multiple Interpreters in the Stdlib
/r/Python
https://redd.it/18e0q7p
Python documentation
What’s New In Python 3.12
Editor, Adam Turner,. This article explains the new features in Python 3.12, compared to 3.11. Python 3.12 was released on October 2, 2023. For full details, see the changelog. Summary – Release hi...
Jupyter highlight
Hi all, i'm pretty new on jupyter. I was using notebook 6.5.4 version on Chrome, today I updated to 7.0.6 version, but python function like range() are no longer highlighted.
How can i solve this issue? Thank you.
/r/JupyterNotebooks
https://redd.it/18e1njj
Hi all, i'm pretty new on jupyter. I was using notebook 6.5.4 version on Chrome, today I updated to 7.0.6 version, but python function like range() are no longer highlighted.
How can i solve this issue? Thank you.
/r/JupyterNotebooks
https://redd.it/18e1njj
Reddit
From the JupyterNotebooks community on Reddit
Explore this post and more from the JupyterNotebooks community
I made a Django+react SaaS boilerplate that leverages the Django Admin to give end-users access to data (via Stripe subscriptions)
Hi!
From the Github repo:
​
>YaSaas is an open-source SaaS boilerplate built on Django REST Framework and React, offering a flexible foundation for entrepreneurs looking to monetize their data.With seamless integration of Stripe subscriptions and leveraging Django admin functionalities.
Will you join me in the darkside where Django Admin can be used by end-users?
/r/django
https://redd.it/18e538s
Hi!
From the Github repo:
​
>YaSaas is an open-source SaaS boilerplate built on Django REST Framework and React, offering a flexible foundation for entrepreneurs looking to monetize their data.With seamless integration of Stripe subscriptions and leveraging Django admin functionalities.
Will you join me in the darkside where Django Admin can be used by end-users?
/r/django
https://redd.it/18e538s
Reddit
From the django community on Reddit
Explore this post and more from the django community
Built a Python script to get Spotify stats!
Hey r/Python,
I wrote a Python script while I was playing with the Spotify API which can get your Spotify Stats :)
https://preview.redd.it/b32baddnc55c1.png?width=640&format=png&auto=webp&s=e1720187f521f72cf4a6e356a678e6c613018623
Repository Link : https://github.com/ni5arga/spotify-stats-python
Feel free to star and fork!
/r/Python
https://redd.it/18dyf8o
Hey r/Python,
I wrote a Python script while I was playing with the Spotify API which can get your Spotify Stats :)
https://preview.redd.it/b32baddnc55c1.png?width=640&format=png&auto=webp&s=e1720187f521f72cf4a6e356a678e6c613018623
Repository Link : https://github.com/ni5arga/spotify-stats-python
Feel free to star and fork!
/r/Python
https://redd.it/18dyf8o
Connecting Django API to a Django crud app. How?
Watched a tutorial in how to create an API with Django and created several APIs with this tool. Now the next step I am planning is to create a basic crud app using Django where I will have JavaScript within a JS template file perform very basic math which will take the user numeric value input from an input tag within a form. My question is since i never developed a full stack application. I am completely lost. I want for the backend (Django) to get the data from the user and store it onto a database SQLite3. As a beginner who has basic knowledge of the client side using HTML5, CSS3 and JavaScript and very little knowledge with Django but only creating APIs. Can anyone give me a recommendation on what is the easiest way to create a crud app which calls an API? Should I allow Django to perform the math or is it ok to allow the client which is JavaScript to perform the math and have Django get and send to the database? Complete newbie! Thank you all.
/r/django
https://redd.it/18e556p
Watched a tutorial in how to create an API with Django and created several APIs with this tool. Now the next step I am planning is to create a basic crud app using Django where I will have JavaScript within a JS template file perform very basic math which will take the user numeric value input from an input tag within a form. My question is since i never developed a full stack application. I am completely lost. I want for the backend (Django) to get the data from the user and store it onto a database SQLite3. As a beginner who has basic knowledge of the client side using HTML5, CSS3 and JavaScript and very little knowledge with Django but only creating APIs. Can anyone give me a recommendation on what is the easiest way to create a crud app which calls an API? Should I allow Django to perform the math or is it ok to allow the client which is JavaScript to perform the math and have Django get and send to the database? Complete newbie! Thank you all.
/r/django
https://redd.it/18e556p
Reddit
From the django community on Reddit
Explore this post and more from the django community
Recently visited page middleware
Supercharge User Experience with Recently Visited Pages Middleware!
Easily implement a recently visited pages feature in your Django rest framework app using the ‘recently-visited-page-middleware’ package. Track and retrieve user-specific page history effortlessly. Enhance user engagement and navigation. Get started with a simple pip install:
pip install recently-visited-page-middleware
Github repository link : https://github.com/Abiorh001/recently_visited_page_middleware
/r/django
https://redd.it/18e8sg2
Supercharge User Experience with Recently Visited Pages Middleware!
Easily implement a recently visited pages feature in your Django rest framework app using the ‘recently-visited-page-middleware’ package. Track and retrieve user-specific page history effortlessly. Enhance user engagement and navigation. Get started with a simple pip install:
pip install recently-visited-page-middleware
Github repository link : https://github.com/Abiorh001/recently_visited_page_middleware
/r/django
https://redd.it/18e8sg2
GitHub
GitHub - Abiorh001/recently_visited_page_middleware
Contribute to Abiorh001/recently_visited_page_middleware development by creating an account on GitHub.
Trending on GitHub globally 3 days in a row: SuperDuperDB, a Python framework for integrating AI with major databases (making them super-duper)
It is for building AI (into your) apps easily without complex pipelines and make your database intelligent (including vector search), definitely check it out: https://github.com/SuperDuperDB/superduperdb
/r/Python
https://redd.it/18ec2p7
It is for building AI (into your) apps easily without complex pipelines and make your database intelligent (including vector search), definitely check it out: https://github.com/SuperDuperDB/superduperdb
/r/Python
https://redd.it/18ec2p7
GitHub
GitHub - superduper-io/superduper: Superduper: End-to-end framework for building custom AI applications and agents.
Superduper: End-to-end framework for building custom AI applications and agents. - superduper-io/superduper
Working on updating the PyDev debugger to use sys.monitoring... I just love my multi-monitor setup with LiClipse ;)
Ok, so, I'm updating the PyDev debugger to use sys.monitoring...Hopefully it'll land soon (I've been working on and off in it for a while and not that much is missing for a final release).
Now, I stopped to breath a little and I just realized I really like using LiClipse with multiple monitors.
My window arrangement using LiClipse
/r/Python
https://redd.it/18eb2aq
Ok, so, I'm updating the PyDev debugger to use sys.monitoring...Hopefully it'll land soon (I've been working on and off in it for a while and not that much is missing for a final release).
Now, I stopped to breath a little and I just realized I really like using LiClipse with multiple monitors.
My window arrangement using LiClipse
/r/Python
https://redd.it/18eb2aq
Django email, need help
I'm trying to send an email to people when 3 or fewer days are remain, I'm using Django, this is the models.py in my main app, I want to automatically send emails when 3 days or less remain I'm using 4.2
class sub(models.Model):
id = models.UUIDField(default=uuid.uuid4, primary_key = True, editable = False)
provider = models.CharField(max_length=70)
tier = models.CharField(max_length=40)
date_started = models.DateField(auto_now=False, auto_now_add=False)
date_end = models.DateField(auto_now=False, auto_now_add=False, )
author = models.ForeignKey(User, on_delete=models.CASCADE)
def remain(self):
today = date.today()
remaining_days = (self.date_end - today).days
return(remaining_days)
​
​
​
def get_absolute_url(self):
return reverse('sub-detail', kwargs={'pk':self.id})
/r/django
https://redd.it/18eh2h9
I'm trying to send an email to people when 3 or fewer days are remain, I'm using Django, this is the models.py in my main app, I want to automatically send emails when 3 days or less remain I'm using 4.2
class sub(models.Model):
id = models.UUIDField(default=uuid.uuid4, primary_key = True, editable = False)
provider = models.CharField(max_length=70)
tier = models.CharField(max_length=40)
date_started = models.DateField(auto_now=False, auto_now_add=False)
date_end = models.DateField(auto_now=False, auto_now_add=False, )
author = models.ForeignKey(User, on_delete=models.CASCADE)
def remain(self):
today = date.today()
remaining_days = (self.date_end - today).days
return(remaining_days)
​
​
​
def get_absolute_url(self):
return reverse('sub-detail', kwargs={'pk':self.id})
/r/django
https://redd.it/18eh2h9
What 12,500 Surveys and 6,300 Salaries Data Points Taught Us About Jobs in Germany & Switzerland?
Over the past 2 months, we've delved deep into the preferences of jobseekers and salaries in Germany (DE) and Switzerland (CH).
The results of over 6'300 salary data points and 12'500 survey answers are collected in the Transparent IT Job Market Reports. If you are interested in the findings, you can find direct links below (no paywalls, no gatekeeping, just raw PDFs):
https://static.swissdevjobs.ch/market-reports/IT-Market-Report-2023-SwissDevJobs.pdf
https://static.germantechjobs.de/market-reports/IT-Market-Report-2023-GermanTechJobs.pdf
/r/django
https://redd.it/18eldlp
Over the past 2 months, we've delved deep into the preferences of jobseekers and salaries in Germany (DE) and Switzerland (CH).
The results of over 6'300 salary data points and 12'500 survey answers are collected in the Transparent IT Job Market Reports. If you are interested in the findings, you can find direct links below (no paywalls, no gatekeeping, just raw PDFs):
https://static.swissdevjobs.ch/market-reports/IT-Market-Report-2023-SwissDevJobs.pdf
https://static.germantechjobs.de/market-reports/IT-Market-Report-2023-GermanTechJobs.pdf
/r/django
https://redd.it/18eldlp
Authenticate against OAuth2 from your Python CLIs
https://github.com/timo-reymann/python-oauth2-cli-auth
/r/Python
https://redd.it/18efjwe
https://github.com/timo-reymann/python-oauth2-cli-auth
/r/Python
https://redd.it/18efjwe
GitHub
GitHub - timo-reymann/python-oauth2-cli-auth: Authenticate against OAuth2 Provider in Python CLIs
Authenticate against OAuth2 Provider in Python CLIs - GitHub - timo-reymann/python-oauth2-cli-auth: Authenticate against OAuth2 Provider in Python CLIs
Unable to connect to the local mysql database
I am trying to create a basic authentication framework for which I need to connect my flask app to a local mysql database, and my credentials seem to be correct as the pymsyql code below works and the localhost page renders the database contents correctly, however, the flasj_mysqldb code does not work and gives the error "error": "'NoneType' object has no attribute 'cursor'"
I have tried looking at different sources all of which say the database credentials might be a problem, but I know for sure that this is not the case. Any help is appreciated.
erroneous code:
from flask import Flask, jsonify
from flaskmysqldb import MySQL
server = Flask(name)
server.config["MYSQLUSER"] = "superuser"
server.config"MYSQL_PASSWORD" = "superpass"
server.config"MYSQL_HOST" = "localhost"
server.config"MYSQL_DB" = "auth"
mysql = MySQL(server)
@server.route("/")
def index():
try:
with mysql.connection.cursor() as cur:
/r/flask
https://redd.it/18ep76i
I am trying to create a basic authentication framework for which I need to connect my flask app to a local mysql database, and my credentials seem to be correct as the pymsyql code below works and the localhost page renders the database contents correctly, however, the flasj_mysqldb code does not work and gives the error "error": "'NoneType' object has no attribute 'cursor'"
I have tried looking at different sources all of which say the database credentials might be a problem, but I know for sure that this is not the case. Any help is appreciated.
erroneous code:
from flask import Flask, jsonify
from flaskmysqldb import MySQL
server = Flask(name)
server.config["MYSQLUSER"] = "superuser"
server.config"MYSQL_PASSWORD" = "superpass"
server.config"MYSQL_HOST" = "localhost"
server.config"MYSQL_DB" = "auth"
mysql = MySQL(server)
@server.route("/")
def index():
try:
with mysql.connection.cursor() as cur:
/r/flask
https://redd.it/18ep76i
Reddit
From the flask community on Reddit
Explore this post and more from the flask community