Tips and Traps¶
It is suggested that you avoid using JSON for serializing and deserializing data. Please refer to Shotcomes of JSON for detailed discussions on this. TOML and YAML are better text-based alternatives to JSON. If serialization and deserialization is done in Python only, pickle
Hands on SQLite3
Tips and Traps¶
Do NOT use SQLite3 on network filesystems (NFS, SAMBA, etc).
.schema
show create statement of a tableYou can force query to keep the original order of rows by applying
order by rowid
.SQLite3 supports full-text search by the FTS5 extension (since 3.9.0). It is suggested that you use the
porter
Garbage Collection in Python
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Hands on the Python Module Packaging
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Version Handling¶
Hands on the requests Module in Python
Comments¶
It is suggested that you use the requests module instead of urllib unless you want to have minimal 3rd-party dependencies.
Response.raise_for_status
is a convenient method for raising an exception corresponding to the HTTP status code.
Parse Semantic Version in Python
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
- There are at least 3 packages (
packaing
,python-semver
and) in Python which can help you work with semantic versions.