6 ms·
Useful Python Libraries for Startups
- merb 11y agoThis is extremely subjective.
- JustSomeNobody 11y agoTrue. 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.
- skhatri11 11y agoIt is quasi-contextual, but it would seem that a lot of startups share the same problems so there is broad applicability.
- merb 11y agoYeah 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. ;)
- Semiapies 11y agoNoting that an article of someone's recommendations is subjective is...well, you could have just said, "This is a blog post."
- zallarak 11y agoAgreed. 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).
- craigds 11y agoIs 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...)
- knicholes 11y agoI expected more libraries.
- Semiapies 11y agoAgreed, but I hadn't heard of the first two, so worth the time.
- hornbill 11y agoI 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.
- zallarak 11y agoWe 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.
- athoik 11y agopython-requests is a must have! Requests: HTTP for Humans http://docs.python-requests.org/en/latest/ http://docs.python-requests.org/en/latest/
- pbreit 11y agoI seem to do fine with httplib/2 and generally prefer core libraries. Am I really missing out on much?
- dimino 11y agoPython-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 https://github.com/scrapinghub/dateparser
- rshaban 11y agoHi @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.
- zallarak 11y agoHey, Thanks for the suggestion! I will look into it. Hope you're having a great summer in SF.
- apalmer 11y agoNot sure why these recommendations are start up specific. Nothing here seems particularly 'startup'. These are just good simple general purpose web related python libraries.
- zallarak 11y agoI 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.
- copsarebastards 11y agoIf 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.
- duckmysick 11y ago> 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?
- tuyguntn 11y agoIf 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?
- zallarak 11y agoGood 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-wsgi-apps https://github.com/evansd/whitenoise#quickstart-for-other-ws...
- tuyguntn 11y agoIf 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 http://www.infoq.com/presentations/Simple-Made-Easy
- danneu 11y agoLooks 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".
- carapace 11y agohttps://pypi.python.org/pypi/whitenoise#infrequently-asked-questions https://pypi.python.org/pypi/whitenoise#infrequently-asked-q...
- mangeletti 11y agoSince a lot of startups use AWS, boto ranks up there. https://boto.readthedocs.org/en/latest/ https://boto.readthedocs.org/en/latest/
- sandGorgon 11y agoremember that boto3 was released separately - https://github.com/boto/boto3 https://github.com/boto/boto3
- hayd 11y agoDoes boto3 becoming 1.0 last week mean that everyone should be moving to it or will boto3 merge into boto?
- zallarak 11y agoGreat point :-)!
- caw 11y agoThere's also libcloud, which is a unified API https://libcloud.apache.org/ 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.
- GFK_of_xmaspast 11y agoWhy is "222-222-2222" not a valid phone number?
- bdarnell 11y agoThe 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.
- bohinjc 11y agoRegarding dates, I would have mentioned Arrow - http://crsmithdev.com/arrow/ http://crsmithdev.com/arrow/
- fasouto 11y agohttps://github.com/vinta/awesome-python https://github.com/vinta/awesome-python
- welder 11y agoAn alternative to phonenumbers is https://www.twilio.com/lookup https://www.twilio.com/lookup
- bpicolo 11y agoAPI call vs code not really the same.
- anandpdoshi 11y agoDisclaimer: I am one of the developers that built this. Try Frappe Framework (https://frappe.io https://frappe.io). We have received feedback that it is really good to quickly build internal projects or prototypes. Also ERPNext (https://ERPNext.com 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.
- athoik 11y agoAnother useful library is vatnumber Python module to validate VAT numbers: https://pypi.python.org/pypi/vatnumber https://pypi.python.org/pypi/vatnumber
- JelteF 11y agoWhen 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/ https://jeltef.github.io/PyLaTeX/ Code: https://github.com/JelteF/PyLaTeX https://github.com/JelteF/PyLaTeX
- danhardman 11y agoDoes anyone have any non-python alternatives to these libraries? A lot of them seem very useful to me, but I rarely work in Python.
- truncate 11y agoEvery startup gotta deploy stuff. I remember Fabric a useful tool for quickly deploying and automating various tasks - http://www.fabfile.org/ 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.
- codesushi42 11y agoDependency injection: https://pypi.python.org/pypi/injector/0.9.1 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 https://pypi.python.org/pypi/Flask-Injector