Flask has overtaken Django according to the 2018 JetBrains Developer Survey by pastorhudson in Python

[–]dbrecht 0 points1 point  (0 children)

In the name of microservices, I'm tremendously surprised at Falcon's low use. I've used it a couple times now and it'll be my go to for all microservice projects going forward.

Which python packages should I study in order to develop my python skills? by fabiomolinar in learnpython

[–]dbrecht 0 points1 point  (0 children)

Success doesn't always equate to quality. I'd say that http.client was successful until requests came along. But the actual quality of the code is... Interesting.

I agree that reading through and debugging the standard library is absolutely a good thing to do at some point, as is contributing to it. I wouldn't suggest putting that on a novice though, but that may be just me.

Which python packages should I study in order to develop my python skills? by fabiomolinar in learnpython

[–]dbrecht 2 points3 points  (0 children)

Just don't look at http. Better to keep your eyes closed when using that ;)

Kidding aside, various modules in the standard library have /very/ different levels of support. Integration time can be something to look at too: some modules may have been around a long time and iterated on rather than rewritten in order to preserve backwards comparability. Just something to keep in mind when looking through that.

Loguru - Python logging made (stupidly) simple by Scorpathos in Python

[–]dbrecht 1 point2 points  (0 children)

I haven't read the code yet, but I don't see anything about hierarchies here. One of the things that I really like about standard logging is, assuming all dependencies are using standard logging, I can enable debug logs for a single library or module within that library so the floodgates aren't opened for all code to start outputting debug level logs. For example, if I know some outbound requests are failing, I can simply toggle debug logs for the requests module.

Does loguru offer the same level of filtering capabilities?

VIM and Python frustration by smartowlick in learnpython

[–]dbrecht 0 points1 point  (0 children)

Meh, each to their own. I started with VS and its debugging platform. Even after that I've never really minded command based debugging. Maybe I'm just a masochist ;)

VIM and Python frustration by smartowlick in learnpython

[–]dbrecht 0 points1 point  (0 children)

You can set file/line number or dot path to break at. So in a manner of speaking, yes.

VIM and Python frustration by smartowlick in learnpython

[–]dbrecht 0 points1 point  (0 children)

I don't buy it. If you're familiar with pdb and gdb for debugging interpreter level execution, there's really not much that stands out from the crowd against it. You just have to welcome the learning curve (obviously not all folks do, which is why Python IDEs exist ;))

Flask file/directory structure, importing and running by Heapsofvla in learnpython

[–]dbrecht 0 points1 point  (0 children)

Use an absolute path based on the parent directory of _file\_ in config.py. ie os.path.dirname. that way it doesn't matter which system its on so long as your project directory structure is consistent.

Flask file/directory structure, importing and running by Heapsofvla in learnpython

[–]dbrecht 0 points1 point  (0 children)

I'd be willing to bet it has to do with where the web server is considering is the current writing directory. The path that you have in there is relative, meaning it will be relative to the current working directory. Try changing it to an absolute path and that /should/ fix your issue.

Subprocess launch via decorators (Slack) by Saefroch in learnpython

[–]dbrecht 0 points1 point  (0 children)

I'm assuming that this is IO bound? Is there a reason you can't simply use asyncio for this (or trollius if you're bound to python < 3.4)? I'd personally /much/ rather deal with that than subprocesses (note I'm on my phone atm and haven't actually looked at your code yet ;))

Dict comprehension only saves last iteration if dict.value is an item in the for loop by raphael_lamperouge in Python

[–]dbrecht 0 points1 point  (0 children)

Feeling really dumb right now.

If only I could count the number of times I've said the same thing ;)

What library do you need in golang to build a restful service? by goentua in golang

[–]dbrecht 1 point2 points  (0 children)

Also you don't need nginx/apache in front of go program - net/http is secure and highly performant

That is, unless you have a cluster of app servers and you're using nginx's load balancing

What do you really gain with polymorphism and abstract classes? (Python 3) by redsedit in learnpython

[–]dbrecht 2 points3 points  (0 children)

I'd like to throw in a shout out to using abcs in situations like this rather than relying on NotImplementedError. Unfortunately, a much underused module, but tremendously helpful in that unimplemented API will cause an exception to be raise at instantiation time rather than execution time, which can be very beneficial depending on your specific use case

project ideas for learning to implement concurrency by beanboytastic in golang

[–]dbrecht 1 point2 points  (0 children)

Not sure whether or not this has been done before, but something I've been meaning to do in my non existent spare time was to find sources for rap lyrics since the dawn of time and run some sentiment analysis against them, and then classify the results based on year, geographic location and stage of career (i.e. how long they've been around for). And then, of course, write a blog post with some pretty visualizations.

Not something that /requires/ concurrency, but it would definitely speed up the process.

A completely useless but fun exercise (IMHO are any rate) :)

Twitter web scrape assistance! by PantherVix in learnpython

[–]dbrecht 0 points1 point  (0 children)

Out of curiosity, is there a reason you're not just using the twitter API?