Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Python Libraries for ETL Data Validation?

I am looking for a python library to validate the output of etl jobs that use sql statement and an expected value. Then if the tests fail there are callbacks I can use, or possibly a dashboard that is updated with the failed tests. Anyone aware of anything that fits the bill?

/r/Python
https://redd.it/89vr6a
Suggestions on how to mimic this visualization in Python?

/r/Python
https://redd.it/89wogl
JQery pretty much the only way to call Function without reloading page?

Still pretty new to Django but I've gotten to a point with my website where I want the user to press a button which calls a python function, return the values and then replace various bits of html needed WITHOUT reloading the entire page.

So far my searching has mostly come up with these kind of [solutions](https://stackoverflow.com/questions/17599035/django-how-can-i-call-a-view-function-from-template)... I assumed Django had a "Django Way" for doing this kind of thing.. maybe using jinja or something, but I can't seem to find it.. or atleast can't find what I assume I am looking for.

What is the proper way of doing what I am talking about?

/r/djangolearning
https://redd.it/89svb6
Questions from a beginner about hosting a Django website

I'm new to webdev in general and pretty much finished my first django project but I'm not sure about a few things when it comes to hosting, would really appreciate it if someone could help me out here:

1.Right now I'm using a DigitalOcean one click app to host my site and it works fine, but is this still a good option when the amount
of traffic for example is increasing?

2.So I've seen that you can host the database (MySQL) on the server it's self or using a 3rd party service which I'm doing right now
just cause it's easier, is there a reason I would have to run my DB on my server at some point (again e.g more trafic)?


/r/django
https://redd.it/89yo3p
Need help with Javascript and Django

I currently have a very small Javascript application that has a input field and then searches the OMDB API to get results for the entered keyword. I was to dramatically expand the application and for that I need a backend. I’m going to use Django because I have experience with it, but there is one thing I’m not sure about. Should I keep using Javascript to request information from the API, or should i use Django to do it instead? I don’t know which way is the “more correct” way of doing it. Thanks in advance!

/r/djangolearning
https://redd.it/8a0qse
MatchIt in python

Do we have something similar to R 'MatchIt' package in python. In order to match study and control items using different methods ( propensity score might be one of them)? I came across CasualInference (http://causalinferenceinpython.org/causalinference.core.html), but it seems somewhat limited to only propensity score.

/r/pystats
https://redd.it/8a20hz
How do I set a redirect URL to be localhost if debug is true or the production URL if debug is false?

I remember stumbling across an SO post about this but I can't find it anymore. :(

I remember seeing there was a way to at least code in a way to serve static files via local or S3 depending on the value of debug. Anyone know how to do this?

/r/flask
https://redd.it/8a5k8t
LOGGING not writing to file

I'm trying to set up logging in my app and I can't seem to get it to write to a file, am I missing something obvious?

Let's assume my applications is named myApp and that i have `debug.log` there

thanks in advance!


LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},

'handlers': {
'console': {
'level': 'INFO',
'class': 'logging.StreamHandler',
'formatter': 'verbose'
},
'file': {
'level': 'INFO',
'class': 'logging.FileHandler',
'filename': 'debug.log',
},
},
'loggers': {
'myApp': {
'handlers': ['file'],
'propagate': True,
},
'myApp.request': {
'handlers': ['console', 'file'],
'level': 'ERROR',
'propagate': False,
},
}
}

/r/djangolearning
https://redd.it/8a4vu2
Job Opening

Would this be the best subreddit to find a Senior Django developer for a three month contract job? Any other subreddits that this is more appropriate?


/r/django
https://redd.it/8a67iy
[AF] associating a hyperlink with a python function

How does one associate a link with a python function? I'm trying to make an application that will graph different datasets in matplotlib and display them accordingly. Essentially, when the link is clicked, I want the function to graph the according dataset, output it to an image and then display it on the webpage.

Full disclosure: I'm an absolute noob when it comes to Flask but I know some python and html/css. I'm mainly trying to make a gui for a python app I'm writing but I couldn't figure out Kivy with the amount of time I have and figured this might be a better option.

Thanks in advance

/r/flask
https://redd.it/8a0k3g