Metadata-Version: 2.1
Name: xrayweb
Version: 2024.11.0
Summary: Web interface for X-ray Properties of the elements
Author: Alex Nicolellis
Author-email: Matthew Newville <newville@cars.uchicago.edu>
License: MIT License
        
        Copyright (c) 2020 Alex Nicolellis and Matthew Newville
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage,  https://github.com/xraypy/xrayweb
Project-URL: Documentation, https://github.com/xraypy/xrayweb
Project-URL: Tracker, https://github.com/xraypy/xrayweb/issues
Keywords: X-ray spectroscopy,Physics
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: xraydb
Requires-Dist: sqlalchemy>=2
Requires-Dist: numpy
Requires-Dist: flask
Requires-Dist: plotly
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: all
Requires-Dist: xrayweb[dev]; extra == "all"

# xrayweb
Web interface for X-ray properties of the elements,
using https://github.com/xraypy/XrayDB,
Python, Flask, and Plotly.

Existing versions of this wep application  are running at

 https://seescience.org/xraydb and at
 https://xraydb.xrayabsorption.org


## install

XrayWeb requires Python 3.9 or higher

To install this code, use


    > pip install xrayweb

To run a local version of this web application, run the script "run.py" with

      > python run.py

will launch a local web server with the app running at http://127.0.0.1:4966/


## deploying with Apache and WSGI

To deploy this web application with Apache, you will need to install `mod_wsgi`
(for Python3) for your instance of Apache.  You will also have create a wsgi
python script that can be run by the web server.

For examplle, you may make a folder `/var/www/xraydb` and place in the file
`xraydb.wsgi`, containing

    #!/uar/bin/python
    # file /var/www/xraydb/xraydb.wsgi
    from xrayweb import app as application


Then,  you will need to load the wsgi module in your Apache configuration, with


    # make sure wsgi module is loaded
    <IfModule !wsgi_module>
        LoadModule wsgi_module modules/mod_wsgi_python3.so
    </IfModule>

    # define /xraydb URL
    WSGIDaemonProcess xraydb user=apache group=apache threads=5
    WSGIScriptAlias /xraydb /var/www/xraydb/xraydb.wsgi
    <Directory /var/www/xraydb>
       WSGIProcessGroup xraydb
       WSGIApplicationGroup %{GLOBAL}
       Options all
       Require all granted
    </Directory>

Restarting apache,  the script should run on your web server at
https://example.com/xraydb
