背景 Python 2 用のコードを書くときは、 Python 3 対応を見越して # -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import をテンプレとして書いています。 __future__ はファイルごとにバラバラだと混乱を招くので、今関わってるプロジェクトでもこれを新規ファイルのテンプレとして登録してもらってます。 Python 3 の構文、リテラルを有効にする __future__ のうち、 unicode_literals だけは今まで使っていなかったのですが、ふと「あ、やっぱり使うべきだな」と思いついたので、そのへんをまとめます。 第三の文字列型 native string Python 2 には2つの文字列型 str (bytes) と unicode が
Unverified details These details have not been verified by PyPI Project links Homepage Documentation Source Meta License: MIT License (MIT License) Author: Charles Leifer Classifiers Development Status 5 - Production/Stable Intended Audience Developers License OSI Approved :: MIT License Operating System OS Independent Programming Language Python Python :: 2 Python :: 2.7 Python :: 3 Python :: 3.4
The Hitchhiker’s Guide to Python!¶ Greetings, Earthling! Welcome to The Hitchhiker’s Guide to Python. This is a living, breathing guide. If you’d like to contribute, fork us on GitHub! This handcrafted guide exists to provide both novice and expert Python developers a best practice handbook for the installation, configuration, and usage of Python on a daily basis. This guide is opinionated in a wa
import asyncio async def main(): print('Hello ...') await asyncio.sleep(1) print('... World!') asyncio.run(main()) asyncio is a library to write concurrent code using the async/await syntax. asyncio is used as a foundation for multiple Python asynchronous frameworks that provide high-performance network and web-servers, database connection libraries, distributed task queues, etc. asyncio is often
Recipes¶ This is a collection of code snippets and examples for common use cases. Keeping track of Sessions¶ There is no built-in support for sessions because there is no right way to do it (in a micro framework). Depending on requirements and environment you could use beaker middleware with a fitting backend or implement it yourself. Here is an example for beaker sessions with a file-based backen
Here on CheckiO we are creating games for coders. We have made py.checkio.org and js.checkio.org where you can improve your TypeScript and Python coding skills. We have also created Empire of Code - a space game with a mix of strategy, tactics and coding. In addition to the 50k monthly active Python and TypeScript players, who are constantly improving their skills by engaging in CheckiO missions a
Python RSS Code Articles: The PythonWeb services developer: RSS for Python http://codeboje.de/blog/archives/Feeds-and-python-II.html - Short articles about using Universal Feed Parser Libraries: the Universal Feed Parser - Reads 9 RSS versions and Atom RSS.py - reads most RSS versions, produces RSS 1.0 SpycyRoll - I don't know much about - this is an aggregator, and perhaps other stuff as well PyR
2016-12-09追記 「Pythonクローリング&スクレイピング」という本を書きました! Pythonクローリング&スクレイピング -データ収集・解析のための実践開発ガイド- 作者: 加藤耕太出版社/メーカー: 技術評論社発売日: 2016/12/16メディア: 大型本この商品を含むブログを見る 2015年6月21日 追記: この記事のクローラーは動かなくなっているので、Scrapy 1.0について書いた新しい記事を参照してください。 2014年1月5日 16:10更新: デメリットを修正しました。 以下の記事が話題になっていたので、乗っかってPythonの話を書いてみたいと思います。 Rubyとか使ってクローリングやスクレイピングするノウハウを公開してみる! - 病みつきエンジニアブログ 複数並行可能なRubyのクローラー、「cosmicrawler」を試してみた - プログラマにな
このようなサンプルが意外と見つからなかったので作りました。 GitHub API GitHubはWeb API を提供しており、リポジトリやユーザーなどをAPI経由で取得・操作することができます。 執筆時の2014年2月現在では、v3とbetaの2つのバージョンがあり、デフォルトはbetaです。ややわかりにくい名前付けですが、betaのほうが古いようで、2014年4月15日からv3がデフォルトになる予定です。 利用するバージョンはHTTPリクエストのAcceptヘッダーで指定できます。v3とbetaの違いはあまり大きくないみたいなので、現時点では特に指定せずにデフォルトのバージョンを使っても問題なさそうです。 認証方法 としては、Basic認証、OAuth2 Token、OAuth2 Key/Secretの3種類が利用できます。 今回は、Flaskを利用したWebアプリなので、OAuth2
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く