<commit_before>====
Introduction to Theas
====
*******
What is Theas?
*******

Theas is a turn-key web application server and development platform for building database-driven web applications.

You can think of Theas being kind of like Wordpress, but for building web applications (not websites), and providing a built-in web server (not requiring Apache or nginx).

Theas is a server-side web application framework that provides:

    #. turnkey performance and security-aware embedded web server
    #.extensions to Jinja2 templating via custom filters
    #.session management
    #.session data management and multi-tier data binding
    #.database-only content and templates (no filesystem used)
    #.mechanism for using template-specific stored procedure to retrieve and update data
    #.support for both normal POST / GET requests and async / AJAX request ... and more.
    
Theas does not impose any restrictions on client-side development: you are free to use whatever tools and frameworks you like.

Theas is built in Python 3.4, using Tornado for the web server, Jinja2 for templating, and pymssql for MS SQL connectivity. Theas was built to work with Microsoft SQL, and in particular, the SQL-based OpsStream business execution platform, but can be used with other database platforms as well.

*******
Overview
*******

Theas (Greek word for goddess) is a server-side web application framework for building database-driven web applications to be used by authenticated users. Theas is not designed for public facing websites.

Theas is written in Python, but you don’t need to write Python code to use Theas. You need only write standard HTML / CSS / JavaScript, incorporate the Jinja2 templating syntax in your HTML, and write stored procedures that return data to the HTM templates and process data submitted by HTML pages.

With Theas, no file-system based content is used. All content served up by Theas comes from a database. This includes HTML templates, and any other resources such as CSS and JS files, images, and the like that you choose to allow Theas to manage.

Theas provides its own self-contained web server (built on top of Tornado, a popular Python package). Theas does not require (or support) use of Apache, Nginx, IIS, or any such general-purpose web server.

Theas is cross-platform: It can be run from Windows, Linux or OS X, but it was written primarily to run on Windows.

Theas can be extended to use any database engine, but it was written to use Microsoft’s MS SQL. At present this is the only database engine supported natively without modifying Theas code.

Though Theas is a valuable framework for web application development on its own, it was developed as a front end for the commercially-available OpsStream business execution platform. When paired with OpsStream, Theas can provide a great deal of functionality including dynamic database schema modification (configured from a browser), robust business process execution / workflow capabilities, and comprehensive role-based security.

*******
Getting started
*******

Theas requires a handful of configuration settings be set. These are stored in the file settings.cfg but they can also be passed in as command-line parameters when Theas is launched. Settings include things like the HTTP port Theas is to use and the database connection information.

Theas can be run as an application (i.e. a console application) or as a Windows service.

No installation is required: Theas can be launched directly from any folder.

Multiple instances of Theas can be run simultaneously—connected either to different databases, or connected to the same database. Each Theas instance must run on its own HTTP port.

For simplicity I recommend that each instance of Theas be run in its own folder with its own settings.cfg file. (In other words, make a copy of the whole Theas folder and edit the settings.cfg file to run a second instance of Theas.) I also recommend that you rename the Theas.exe file to something specific, such as theas_MyApplication.exe Doing so allows you to see the Theas process clearly in task manager (and service manager, if running as a service).

I typically run multiple Theas instances on the same server, each supporting a different web application and each connected to a different database, and each on its own HTTP port. I then typically run a reverse proxy in front of the Theas instances to route requests to specific domains and host names on standard HTTP / HTTPS ports to the correct Theas HTTP port.

Theas expects that SSL / HTTPS will be provided by the reverse proxy. Theas does not natively support or require SSL.

Theas includes a simple MS SQL database. This can be run on any version of MS SQL (SQL 2005 or later), and can be run on any edition including the free MS SQL Server Express, and including hosted SQL from Microsoft Azure or other provider.

I encourage you to consider running the commercially-available OpsStream business execution platform in lieu of the simple database provided with Theas. OpsStream provides a turnkey environment for robust, complex, secure, enterprise-class applications.

But Theas can be used as a free, OSS (open-source software) platform without any dependencies on OpsStream when the included Theas database is run on the free edition of Microsoft SQL Server Express.

*******
About the name
*******

Why is this project named “Theas”? Theas is the Greek work for "goddess".<commit_msg>Update index.rst<commit_after>############
Introduction to Theas
############

************
What is Theas?
************

Theas is a turn-key web application server and development platform for building database-driven web applications.

You can think of Theas being kind of like Wordpress, but for building web applications (not websites), and providing a built-in web server (not requiring Apache or nginx).

Theas is a server-side web application framework that provides:

    #. turnkey performance and security-aware embedded web server
    #. extensions to Jinja2 templating via custom filters
    #. session management
    #. session data management and multi-tier data binding
    #. database-only content and templates (no filesystem used)
    #. mechanism for using template-specific stored procedure to retrieve and update data
    #. support for both normal POST / GET requests and async / AJAX request ... and more.
   
.. note::   
    Theas does not impose any restrictions on client-side development: you are free to use whatever tools and frameworks you like.

Theas is built in Python 3.4, using Tornado for the web server, Jinja2 for templating, and pymssql for MS SQL connectivity. Theas was built to work with Microsoft SQL, and in particular, the SQL-based OpsStream business execution platform, but can be used with other database platforms as well.

*******
Overview
*******

Theas (Greek word for goddess) is a server-side web application framework for building database-driven web applications to be used by authenticated users. Theas is not designed for public facing websites.

Theas is written in Python, but you don’t need to write Python code to use Theas. You need only write standard HTML / CSS / JavaScript, incorporate the Jinja2 templating syntax in your HTML, and write stored procedures that return data to the HTM templates and process data submitted by HTML pages.

With Theas, no file-system based content is used. All content served up by Theas comes from a database. This includes HTML templates, and any other resources such as CSS and JS files, images, and the like that you choose to allow Theas to manage.

Theas provides its own self-contained web server (built on top of Tornado, a popular Python package). Theas does not require (or support) use of Apache, Nginx, IIS, or any such general-purpose web server.

Theas is cross-platform: It can be run from Windows, Linux or OS X, but it was written primarily to run on Windows.

Theas can be extended to use any database engine, but it was written to use Microsoft’s MS SQL. At present this is the only database engine supported natively without modifying Theas code.

Though Theas is a valuable framework for web application development on its own, it was developed as a front end for the commercially-available OpsStream business execution platform. When paired with OpsStream, Theas can provide a great deal of functionality including dynamic database schema modification (configured from a browser), robust business process execution / workflow capabilities, and comprehensive role-based security.

*******
Getting started
*******

Theas requires a handful of configuration settings be set. These are stored in the file settings.cfg but they can also be passed in as command-line parameters when Theas is launched. Settings include things like the HTTP port Theas is to use and the database connection information.

Theas can be run as an application (i.e. a console application) or as a Windows service.

No installation is required: Theas can be launched directly from any folder.

Multiple instances of Theas can be run simultaneously—connected either to different databases, or connected to the same database. Each Theas instance must run on its own HTTP port.

For simplicity I recommend that each instance of Theas be run in its own folder with its own settings.cfg file. (In other words, make a copy of the whole Theas folder and edit the settings.cfg file to run a second instance of Theas.) I also recommend that you rename the Theas.exe file to something specific, such as theas_MyApplication.exe Doing so allows you to see the Theas process clearly in task manager (and service manager, if running as a service).

I typically run multiple Theas instances on the same server, each supporting a different web application and each connected to a different database, and each on its own HTTP port. I then typically run a reverse proxy in front of the Theas instances to route requests to specific domains and host names on standard HTTP / HTTPS ports to the correct Theas HTTP port.

Theas expects that SSL / HTTPS will be provided by the reverse proxy. Theas does not natively support or require SSL.

Theas includes a simple MS SQL database. This can be run on any version of MS SQL (SQL 2005 or later), and can be run on any edition including the free MS SQL Server Express, and including hosted SQL from Microsoft Azure or other provider.

.. note::
    I encourage you to consider running the commercially-available OpsStream business execution platform in lieu of the simple database provided with Theas. OpsStream provides a turnkey environment for robust, complex, secure, enterprise-class applications.

    But Theas can be used as a free, OSS (open-source software) platform without any dependencies on OpsStream when the included Theas database is run on the free edition of Microsoft SQL Server Express.

*******
About the name
*******

Why is this project named “Theas”? Theas is the Greek work for "goddess".
{'fraction_non_alphanumeric': 0.04612445414847162, 'fraction_numerical': 0.0016375545851528383, 'mean_word_length': 4.378180039138943, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '711331', 'n_tokens_mistral': 2550, 'n_tokens_neox': 2469, 'n_words': 1688}