News for hackers. Stuff that matters.
Re:Useful Python Libraries for Startups by apalmer on Tuesday June 30, 2015 @02:17PM (#9807331)
Not sure why these recommendations are start up specific. Nothing here seems particularly 'startup'. These are just good simple general purpose web related python libraries.
Re:Useful Python Libraries for Startups by zallarak on Tuesday June 30, 2015 @02:27PM (#9807425)
I can see that perspective. My thoughts were that each of these were not the "best" way to do things, but provided a great effort/benefit ratio. For example, if you have a very high traffic website, then you're better off using a CDN for static files instead of Whitenoise.
Re:Useful Python Libraries for Startups by copsarebastards on Tuesday June 30, 2015 @03:08PM (#9807702)
If the effort difference between installing nginx and using Whitenoise makes a significant difference in the success of your business, there are much larger hiccups down the road which are going to put you out of business, so you might as well give up now.
Re:Useful Python Libraries for Startups by duckmysick on Tuesday June 30, 2015 @06:25PM (#9808808)
> My thoughts were that each of these were not the "best" way to do things

May I ask what's the better way to parse international phone numbers?

Re:Useful Python Libraries for Startups by fasouto on Tuesday June 30, 2015 @05:18PM (#9808501)
Re:Useful Python Libraries for Startups by pbreit on Tuesday June 30, 2015 @09:01PM (#9809390)
Not a fan of uncurated, kitchen sink lists like that. Almost worse than no list at all. I know, I know, I don't have to look at it.
Re:Useful Python Libraries for Startups by DevPad on Tuesday June 30, 2015 @05:27PM (#9808545)
Awesome!
Re:Useful Python Libraries for Startups by bohinjc on Tuesday June 30, 2015 @04:30PM (#9808243)
Regarding dates, I would have mentioned Arrow - http://crsmithdev.com/arrow/
Re:Useful Python Libraries for Startups by athoik on Tuesday June 30, 2015 @02:02PM (#9807211)
python-requests is a must have!

Requests: HTTP for Humans http://docs.python-requests.org/en/latest/

Re:Useful Python Libraries for Startups by pbreit on Tuesday June 30, 2015 @09:02PM (#9809397)
I seem to do fine with httplib/2 and generally prefer core libraries. Am I really missing out on much?
Re:Useful Python Libraries for Startups by shpx on Tuesday June 30, 2015 @10:22PM (#9809721)
https://gist.github.com/kennethreitz/973705

I would say not much, but it's much more pythonic.

Re:Useful Python Libraries for Startups by pbreit on Wednesday July 01, 2015 @12:51PM (#9813282)
Interesting but contrived with the authentication part which is rare in my experience (I've never seen it).
Re:Useful Python Libraries for Startups by dimino on Tuesday June 30, 2015 @02:03PM (#9807218)
Python-dateutil is unintuitive as all get-out in my humble opinion, so I recommend dateparser instead (recent release has many great improvements over dateutil, but check it out for yourself to decide [0]).

[0] https://github.com/scrapinghub/dateparser

Re:Useful Python Libraries for Startups by mangeletti on Tuesday June 30, 2015 @03:40PM (#9807918)
Since a lot of startups use AWS, boto ranks up there.

https://boto.readthedocs.org/en/latest/

Re:Useful Python Libraries for Startups by sandGorgon on Tuesday June 30, 2015 @03:45PM (#9807957)
remember that boto3 was released separately - https://github.com/boto/boto3
Re:Useful Python Libraries for Startups by hayd on Tuesday June 30, 2015 @07:28PM (#9809045)
Does boto3 becoming 1.0 last week mean that everyone should be moving to it or will boto3 merge into boto?
Re:Useful Python Libraries for Startups by caw on Tuesday June 30, 2015 @09:37PM (#9809533)
There's also libcloud, which is a unified API https://libcloud.apache.org/

Some AWS specific functions, particularly for newer products or options, aren't always there immediately so you end up having to use boto in those cases. You also sometimes use provider specific options on functions, so it's not totally write-once and ignore.

Re:Useful Python Libraries for Startups by zallarak on Tuesday June 30, 2015 @04:31PM (#9808244)
Great point :-)!
Re:Useful Python Libraries for Startups by anandpdoshi on Wednesday July 01, 2015 @12:05AM (#9810010)
Disclaimer: I am one of the developers that built this.

Try Frappe Framework (https://frappe.io). We have received feedback that it is really good to quickly build internal projects or prototypes.

Also ERPNext (https://ERPNext.com) is an open source erp that is feature rich and has a good UI. It can help any startup to manage their business without resorting to complicated excel sheets based management.

Re:Useful Python Libraries for Startups by hornbill on Tuesday June 30, 2015 @01:34PM (#9807003)
I am curious about why you have to parse dates in different formats. Is it part of a web crawler?

Once I switched to python 3, datetime has been sufficient for my needs as timezone is also handled.

Re:Useful Python Libraries for Startups by zallarak on Tuesday June 30, 2015 @02:02PM (#9807216)
We worked with a third party API for a data source which had inconsistent formats for dates. Also, we A/B test inputs and its awesome to be able to change how users input dates on the front-end without server-side code changes.
Re:Useful Python Libraries for Startups by knicholes on Tuesday June 30, 2015 @12:51PM (#9806624)
I expected more libraries.
Re:Useful Python Libraries for Startups by Semiapies on Tuesday June 30, 2015 @01:34PM (#9807001)
Agreed, but I hadn't heard of the first two, so worth the time.
Re:Useful Python Libraries for Startups by rshaban on Tuesday June 30, 2015 @02:04PM (#9807224)
Hi @zallarak, nice to see you on HN! Not sure if you're doing any text analytics yet, but NLTK is designed to be super-quick to get up and running.
Re:Useful Python Libraries for Startups by zallarak on Tuesday June 30, 2015 @02:12PM (#9807300)
Hey, Thanks for the suggestion! I will look into it. Hope you're having a great summer in SF.
Re:Useful Python Libraries for Startups by tuyguntn on Tuesday June 30, 2015 @03:04PM (#9807675)
If only for testing I would agree with whitenoise, but in case of startup and you are already serving static files why do you want to replace NGINX with Whitenoise? any specific reason for Whitenoise, maybe it is better/simpler/efficient than NGINX?
Re:Useful Python Libraries for Startups by zallarak on Tuesday June 30, 2015 @03:09PM (#9807710)
Good question. We were not using nginx to begin with (rather, serving it through our app server). It was an alternative to nginx and is super easy to set up: https://github.com/evansd/whitenoise#quickstart-for-other-ws...
Re:Useful Python Libraries for Startups by tuyguntn on Tuesday June 30, 2015 @03:16PM (#9807749)
If you are using python code for serving static files, probably you are not seeing lots of traffic yet, I guess you should reconsider your decision and watch "Simple made Easy"[1] talk by Rich Hickey

[1] http://www.infoq.com/presentations/Simple-Made-Easy

Re:Useful Python Libraries for Startups by danneu on Tuesday June 30, 2015 @06:23PM (#9808795)
Looks like Whitenoise can gzip your assets, add a hash to the filename, serve them with far-future headers, and then selectively serve the gzipped version based on Accept-Encoding headers.

Put that behind Cloudflare and your origin server is only hit when an edge location is warming its cache.

Sounds Hickey-tier simple to me, especially compared to your advice of "just use and configure Nginx".

Re:Useful Python Libraries for Startups by carapace on Tuesday June 30, 2015 @04:24PM (#9808197)
Re:Useful Python Libraries for Startups by JelteF on Wednesday July 01, 2015 @03:04AM (#9810376)
When I needed a Python generation, I created abstractions between Python and LaTeX. The documentation is far from finished, but it should be fairly understandable with the examples.

Docs: https://jeltef.github.io/PyLaTeX/

Code: https://github.com/JelteF/PyLaTeX

Re:Useful Python Libraries for Startups by codesushi42 on Wednesday July 01, 2015 @06:56AM (#9811058)
Dependency injection: https://pypi.python.org/pypi/injector/0.9.1

For Flask-- it removes the dependency on a global request context: https://pypi.python.org/pypi/Flask-Injector

Re:Useful Python Libraries for Startups by danhardman on Wednesday July 01, 2015 @03:16AM (#9810402)
Does anyone have any non-python alternatives to these libraries? A lot of them seem very useful to me, but I rarely work in Python.
Re:Useful Python Libraries for Startups by truncate on Wednesday July 01, 2015 @04:24AM (#9810596)
Every startup gotta deploy stuff. I remember Fabric a useful tool for quickly deploying and automating various tasks - http://www.fabfile.org/. Also not a library, but Gunicorn is pretty quick easy way to setup a quick decent HTTP server over your Python WSGI app.
Re:Useful Python Libraries for Startups by athoik on Wednesday July 01, 2015 @12:51AM (#9810130)
Another useful library is vatnumber Python module to validate VAT numbers: https://pypi.python.org/pypi/vatnumber
Re:Useful Python Libraries for Startups by welder on Tuesday June 30, 2015 @11:40PM (#9809954)
An alternative to phonenumbers is https://www.twilio.com/lookup
Re:Useful Python Libraries for Startups by bpicolo on Tuesday June 30, 2015 @11:48PM (#9809973)
API call vs code not really the same.
Re:Useful Python Libraries for Startups by GFK_of_xmaspast on Tuesday June 30, 2015 @04:25PM (#9808203)
Why is "222-222-2222" not a valid phone number?
Re:Useful Python Libraries for Startups by bdarnell on Tuesday June 30, 2015 @04:29PM (#9808223)
The phone numbers library isn't just counting digits; it has a database of which area codes exist (as well as other lesser-known rules, depending on the country). This makes it more effective at filtering out invalid/fake phone numbers, but it does mean you need to stay on top of the latest version as its database changes over time.
Re:Useful Python Libraries for Startups by merb on Tuesday June 30, 2015 @12:39PM (#9806517)
This is extremely subjective.
Re:Useful Python Libraries for Startups by zallarak on Tuesday June 30, 2015 @12:59PM (#9806708)
Agreed. My goal was to share what I thought were solutions to generally common problems, and were't incredibly easy to find (i.e. > 3 google searches to find). The three libraries I selected were general tasks that lots of developers end up having to re-invent (especially phone number parsing).
Re:Useful Python Libraries for Startups by craigds on Tuesday June 30, 2015 @06:34PM (#9808848)
Is parsing phone numbers really a common task for startups? (I've never needed to do it). Is the use-case just validating that the user didn't accidentally type their phone number incorrectly? (Seems if the user wants to give you the wrong phone number, they can just pick one out of a directory...)
Re:Useful Python Libraries for Startups by JustSomeNobody on Tuesday June 30, 2015 @12:54PM (#9806661)
True. More so if you come at it from the perspective of "I use C++ at my startup".

If, however, you use Python at your startup it's more interesting, while still somewhat subjective.

Re:Useful Python Libraries for Startups by skhatri11 on Tuesday June 30, 2015 @01:00PM (#9806716)
It is quasi-contextual, but it would seem that a lot of startups share the same problems so there is broad applicability.
Re:Useful Python Libraries for Startups by merb on Tuesday June 30, 2015 @02:24PM (#9807384)
Yeah but there are other Libraries around, and some people maybe like the "real" libphonenumber more. Nothing against the article (not sure why I got down voted), I don't think it's bad to have a subjective meaning onto something, as long as I clearly state it. And the author also said it, so my comment was not against the article, that was just my subjective meaning about the article. ;)
Re:Useful Python Libraries for Startups by Semiapies on Tuesday June 30, 2015 @04:38PM (#9808287)
Noting that an article of someone's recommendations is subjective is...well, you could have just said, "This is a blog post."