.. -*- coding: utf-8 -*- Chemdb is a chemical inventory system written in Python_ using the Django_ framework. It makes it easy for us to keep track of what we have in the lab. It also generates the required safety information automatically (door warnings and inventories). Installation ============ Packages -------- Gentoo ~~~~~~ I've packaged chemdb for Gentoo_. You need layman_ and my `wtk overlay`_. Install with:: # emerge -av app-portage/layman # layman --add wtk # emerge -av dev-python/chemdb Dependencies ------------ If you're installing by hand or packaging calibcant for another distribution, you'll need the following dependencies: =========== ================= =================================== Package Debian_ Gentoo_ =========== ================= =================================== Django_ python-django dev-python/django Grappelli_ dev-python/django-grappelli [#wtk]_ =========== ================= =================================== .. [#wtk] In the `wtk overlay`_. Installing by hand ------------------ Chemdb is available as a Git_ repository:: $ git clone git://tremily.us/chemdb.git See the homepage_ for details. To install the checkout, run the standard:: $ python setup.py install Usage ===== Setup ----- If you don't have a Django project and you just want to run chemdb as a stand-alone service, you can use the example project written up in ``example``. Set up the project (once):: $ python example/manage.py syncdb See the `Django documentation`_ for more details. You may also want to load some example data, to make your initial browsing more interesting:: $ python example/manage.py loaddata example_data Running ------- Run the app on your local host (as many times as you like):: $ python example/manage.py runserver You may need to add the current directory to ``PYTHONPATH`` so ``python`` can find the ``chemdb`` package. If you're running ``bash``, that will look like:: $ PYTHONPATH=".:$PYTHONPATH" python example/manage.py runserver Hacking ======= This project was largely build following the `Django tutorial`_. That's a good place to start if you're new to Django. Other resources =============== You can `search CAS Registry numbers`_ at NIST. This is useful for decoding MSDS information. NFPA fire diamond ----------------- These are the meanings of the various NFPA warnings: * Blue: Health Hazard 0. Hazard no greater than ordinary material 1. May cause irritation; minimal residual injury 2. Intense or prolonged exposure may cause incapacitation; Residual injury may occur if not treated 3. Exposure could cause serious injury even if treated 4. Exposure may cause death * Red: Fire Hazard 0. Will not burn 1. Must be preheated for ignition; flashpoint above 200°F (93°C) 2. Must be moderately heated for ignition, flashpoint above 100°F (38°C) 3. Ignition may occur under most ambient conditions, Flashpoint below 100°F (38°C) 4. Extremely flammable and will readily disperse through air under standard conditions, flashpoint below 73°F (23°C) * Reactivity hazards: 0. Stable 1. May become unstable at elevated temperatures and pressures. May be mildly water reactive 2. Unstable; may undergo violent decomposition, but will not detonate. May form explosive mixtures with water 3. Detonates with strong ignition source 4. Readily detonates * Special Hazards have the following codes: * OX strong oxidizer * W̶ water reactive * SA simple asphyxiants (The only gases for which this symbol is permitted are nitrogen, helium, neon, argon, krypton, and xenon.) Licence ======= This project is distributed under the `GNU General Public License Version 3`_ or greater. Author ====== W. Trevor King wking@drexel.edu .. _Python: http://www.python.org/ .. _Django: https://www.djangoproject.com/ .. _Gentoo: http://www.gentoo.org/ .. _layman: http://layman.sourceforge.net/ .. _wtk overlay: http://blog.tremily.us/posts/Gentoo_overlay/ .. _Debian: http://www.debian.org/ .. _Grappelli: https://github.com/sehmaschine/django-grappelli .. _Git: http://git-scm.com/ .. _homepage: http://blog.tremily.us/posts/ChemDB/ .. _Django documentation: https://docs.djangoproject.com/ .. _Django tutorial: https://docs.djangoproject.com/en/1.3/intro/tutorial01/ .. _search CAS Registry numbers: http://webbook.nist.gov/chemistry/casf-ser.html .. _GNU General Public License Version 3: http://www.gnu.org/licenses/gpl.txt