1 Web, python, and command-line interfaces for managing a chemical inventory.
6 The web interface (:file:`bin/chem_web.py`) is a web-daemon using
7 CherryPy. Standard command for starting the daemon::
9 $ bin/chem_web.py -a 192.168.1.2 -p 55555
11 Standard command for stopping the daemon::
13 $ bin/chem_web.py --stop
15 From the command line, you can validate CAS#s (and possibly other fields) with::
17 $ bin/chem_db.py -f example/inventory.db -V
23 :mod:`chemdb.db.text` provides the python interface to this format.
24 The basic idea was to produce and use files which were
25 M$-Excel-compatible, since future users might not want to maintain the
26 ChemDB interface. A brief example :file:`inventory.db` file is
27 included in the examples directory.
29 * Tab-delimited ('\t') fields
30 * Endline-delimited ('\n') records
31 * The first line is the header (starts with a pound sign '#').
32 * The header should be a tab-delimited list of short field names.
33 * If the second line also begins with a pound sign,
34 it contains a tab-delimiteded list of long field names.
35 * Blank lines are ignored.
37 The fields H, F, R, and S are the NFPA Health, Fire, Reactivity, and
38 Special Hazards (NFPA diamond).
41 0 Hazard no greater than ordinary material
42 1 May cause irritation; minimal residual injury
43 2 Intense or prolonged exposure may cause incapacitation;
44 Residual injury may occur if not treated
45 3 Exposure could cause serious injury even if treated
46 4 Exposure may cause death
49 1 Must be preheated for ignition; flashpoint above 200°F (93°C)
50 2 Must be moderately heated for ignition, flashpoint above 100°F (38°C)
51 3 Ignition may occur under most ambient conditions,
52 Flashpoint below 100°F (38°C)
53 4 Extremely flammable and will readily disperse through air under standard
54 conditions, flashpoint below 73°F (23°C)
57 1 May become unstable at elevated temperatures and pressures.
58 May be mildly water reactive
59 2 Unstable; may undergo violent decomposition, but will not detonate.
60 May form explosive mixtures with water
61 3 Detonates with strong ignition source
63 * Special Hazards have the following codes:
66 * SA simple ascphyxiants
67 (The only gases for which this symbol is permitted are nitrogen, helium,
68 neon, argon, krypton, and xenon..)
69 * Unofficial Special Hazard codes:
81 AUTHORS (list of authors contributing code to ChemDB)
83 |-- chem_db.py (command line interface)
84 `-- chem_web.py (web interface)
85 chemdb (python package)
86 contrib (useful but non-critical utilities)
87 `-- ssl (SSL key/certificate generation)
88 COPYING (GNU GPLv3 license)
89 DEPENDENCIES (description of software dependencies)
90 example (example data for demonstrations and testing)
91 |-- inventory.db (example inventory database)
92 `-- static (example directory for statically served content)
93 `-- MSDS (example MSDS storage location)
94 `-- 0.html (dummy MSDS for acetic acid)
97 |-- doc (LaTeX source for PDF generation)
98 `-- web (Jinja2 templates for HTML generation)
99 update_copyright.py (script automating copyright blurb maintenance)
102 Generated files and directories
103 -------------------------------
105 ============ =======================================================================
106 backup store database file snapshots from every change
107 chem_web.pid store the Process ID (PID) for a daemonized chem_web.py process
108 chem_web.log log chem_web activity (maintained between runs, so remove periodically)
109 ============ =======================================================================
116 I can create my own self-signed certificate.
117 Protects against eavesdropping, but not man-in-the-middle attacks.
118 Solution for now: hide from external world, trust everyone inside, backup before any change.
124 The original web fron-end was based on Adam Bachman's simplewiki.py_.
126 .. simplewiki.py: http://bachman.infogami.com/another_simple_wiki
132 ChemDB is released under the GNU General Public License version 3.
133 See :file:`COPYING` for details.