python   430249

« earlier    

Arrow: better dates and times for Python
Arrow is a Python library that offers a sensible, human-friendly approach to creating, manipulating, formatting and converting dates, times, and timestamps. It implements and updates the datetime type, plugging gaps in functionality, and provides an intelligent module API that supports many common creation scenarios. Simply put, it helps you work with dates and times with fewer imports and a lot less code.

Arrow is heavily inspired by moment.js and requests.
18 hours ago by dserodio
tqdm/tqdm: A fast, extensible progress bar for Python
Instantly make your loops show a smart progress meter - just wrap any iterable with "tqdm(iterable)", and you're done
python  cli  commandline 
19 hours ago by dserodio
python - Flask redirecting multiple routes - Stack Overflow []
Update: to address the primary question "what's wrong with my routes", the simplest way to debug that is to use app.url_map; e.g:

>>> app.url_map
Map([<Rule '/user/<id>/<username>/' (HEAD, OPTIONS, GET) -> profile>,
<Rule '/static/<filename>' (HEAD, OPTIONS, GET) -> static>,
<Rule '/user/<id>/' (HEAD, OPTIONS, GET) -> profile>])
flask  python  webdevel  debugging  solution 
20 hours ago by kme
python - List all available routes in Flask, along with corresponding functions' docstrings - Stack Overflow []
from flask import Flask, jsonify

app = Flask(__name__)

@app.route('/api', methods = ['GET'])
def this_func():
"""This is a function. It does nothing."""
return jsonify({ 'result': '' })

@app.route('/api/help', methods = ['GET'])
def help():
"""Print available functions."""
func_list = {}
for rule in app.url_map.iter_rules():
if rule.endpoint != 'static':
func_list[rule.rule] = app.view_functions[rule.endpoint].__doc__
return jsonify(func_list)

if __name__ == '__main__':
flask  python  webdevel  rest  api  solution 
20 hours ago by kme
Convert sqlalchemy row object to python dict - Stack Overflow
You may access the internal __dict__ of a SQLAlchemy object, like the following::

for u in session.query(User).all():
print u.__dict__
python  sqlalchemy  solution 
21 hours ago by kme
Structured Logging for Python
structlog makes structured logging with key-value logging, incremental context building and arbitrary formatting very easy.
logging  python 
21 hours ago by dserodio
python - How to serialize SqlAlchemy result to JSON? - Stack Overflow
class User:
def as_dict(self):
return { getattr(self, for c in self.__table__.columns}
flask  python  sqlalchemy  json  serialization  solution 
21 hours ago by kme
sh documentation
sh (previously pbs) is a full-fledged subprocess interface for Python that allows you to call any program as if it were a function:
bash  python  shell 
21 hours ago by dserodio
Python API library and shell utilities to monitor file system events.
21 hours ago by dserodio
eofs: A Library for EOF Analysis of Meteorological, Oceanographic, and Climate Data
The eofs library provides a high-level Python interface for computing empirical orthogonal functions (EOFs) and related quantities, with a focus on correctness and ease of use. The library is implemented in a modular hierarchical fashion, allowing computations using plain arrays, or the inclusion of metadata. The software provides a convenient package for users wanting to perform EOF analysis in Python, and integrates with popular libraries from atmospheric and climate science. The software is available on Github.
python  atmosphere  climate  science  planetary  software 
21 hours ago by soto97

« earlier    

related tags

alarm  anaconda  apache_spark  api-building  api  archive  asyncio  atmosphere  attributes  autocomplete  automation  bash  best-practices  bestof  bios  blacklocus  blog  blogto_answer_my_searches  bot  c  cli  climate  coding  commandline  computer  concurrency  conda  cpp  cs  dashboard  data  database  datascience  date  datetime  dba  debugging  deeplearning  descriptor  design  development  diversity  django  docker  documentation  dotnet  education  elixir  etl  extraction  extras  finance  flask  for-work?  freezing-code  ftfy  geo  github  health  home  howto  http  http2  humour  ibis  installation  ipam  java  javascript  json  jupyter_notebook  key  knowledge  learn  library  license  links  lint  linux  logging  machine-learning  machinelearning  macosx  manage  manager  markdown  matplotlib  microservices  minimalism  ml  mozilla  multimethods  mysql  networking  notebook_server  numpy  oop  opensource  package-manager  package  packages  pandas  pdf  pip  planetary  pokemon  pokemongo  programming  projects  prolog  properties  protocol-buffer  pyinstaller  pyramid  python3  reference  religion  report  resources  rest  restful  science  scraping  scripting  search  security  serialization  server  shell  simplicity  sna  snippets  software  solution  sqlalchemy  ssh  stars:5  sx  syntex  table  tcp  text  textanalyse  time  tips  toolkit  tools  trading  tutorial  unicode  unittest  video  virtualization  visualisierung  visualization  web-programming  web  web2py  webdesign  webdevel  windows  windows10  windows8 

Copy this bookmark: