BI-analytics-admin 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bi_analytics_admin-0.1.0/LICENSE +134 -0
- bi_analytics_admin-0.1.0/PKG-INFO +185 -0
- bi_analytics_admin-0.1.0/README.md +150 -0
- bi_analytics_admin-0.1.0/pyproject.toml +30 -0
- bi_analytics_admin-0.1.0/requirements.txt +34 -0
- bi_analytics_admin-0.1.0/setup.cfg +4 -0
- bi_analytics_admin-0.1.0/src/BI_analytics_admin.egg-info/PKG-INFO +185 -0
- bi_analytics_admin-0.1.0/src/BI_analytics_admin.egg-info/SOURCES.txt +37 -0
- bi_analytics_admin-0.1.0/src/BI_analytics_admin.egg-info/dependency_links.txt +1 -0
- bi_analytics_admin-0.1.0/src/BI_analytics_admin.egg-info/entry_points.txt +2 -0
- bi_analytics_admin-0.1.0/src/BI_analytics_admin.egg-info/requires.txt +22 -0
- bi_analytics_admin-0.1.0/src/BI_analytics_admin.egg-info/top_level.txt +1 -0
- bi_analytics_admin-0.1.0/src/web/auth.py +232 -0
- bi_analytics_admin-0.1.0/src/web/config.py +156 -0
- bi_analytics_admin-0.1.0/src/web/db.py +772 -0
- bi_analytics_admin-0.1.0/src/web/dialects/__init__.py +42 -0
- bi_analytics_admin-0.1.0/src/web/dialects/base.py +124 -0
- bi_analytics_admin-0.1.0/src/web/dialects/mssql.py +89 -0
- bi_analytics_admin-0.1.0/src/web/dialects/mysql.py +102 -0
- bi_analytics_admin-0.1.0/src/web/dialects/postgresql.py +101 -0
- bi_analytics_admin-0.1.0/src/web/dialects/sqlite.py +106 -0
- bi_analytics_admin-0.1.0/src/web/main.py +83 -0
- bi_analytics_admin-0.1.0/src/web/models/dashboard.py +143 -0
- bi_analytics_admin-0.1.0/src/web/models/user.py +73 -0
- bi_analytics_admin-0.1.0/src/web/routers/auth.py +178 -0
- bi_analytics_admin-0.1.0/src/web/routers/connectors.py +222 -0
- bi_analytics_admin-0.1.0/src/web/routers/dashboards.py +196 -0
- bi_analytics_admin-0.1.0/src/web/routers/public_api.py +458 -0
- bi_analytics_admin-0.1.0/src/web/routers/views.py +176 -0
- bi_analytics_admin-0.1.0/src/web/security.py +94 -0
- bi_analytics_admin-0.1.0/src/web/server.py +61 -0
- bi_analytics_admin-0.1.0/src/web/services/email_service.py +123 -0
- bi_analytics_admin-0.1.0/src/web/services/export.py +37 -0
- bi_analytics_admin-0.1.0/src/web/services/migrations.py +100 -0
- bi_analytics_admin-0.1.0/src/web/services/query.py +80 -0
- bi_analytics_admin-0.1.0/src/web/services/storage.py +728 -0
- bi_analytics_admin-0.1.0/src/web/services/user_storage.py +815 -0
- bi_analytics_admin-0.1.0/src/web/services/view_modeling.py +1665 -0
- bi_analytics_admin-0.1.0/src/web/ssl_utils.py +68 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
Required Notice: Copyright Dominika Pillerová (https://myerp.cz) 2026
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree
|
|
10
|
+
to them as both strict obligations and conditions to all
|
|
11
|
+
your licenses.
|
|
12
|
+
|
|
13
|
+
## Copyright License
|
|
14
|
+
|
|
15
|
+
The licensor grants you a copyright license for the software
|
|
16
|
+
to do everything you might do with the software that would
|
|
17
|
+
otherwise infringe the licensor's copyright in it for any
|
|
18
|
+
permitted purpose. However, you may only distribute the
|
|
19
|
+
software according to Distribution License and make changes
|
|
20
|
+
or new works based on the software according to Changes and
|
|
21
|
+
New Works License.
|
|
22
|
+
|
|
23
|
+
## Distribution License
|
|
24
|
+
|
|
25
|
+
The licensor grants you an additional copyright license to
|
|
26
|
+
distribute copies of the software. Your license to distribute
|
|
27
|
+
covers distributing the software with changes and new works
|
|
28
|
+
permitted by Changes and New Works License.
|
|
29
|
+
|
|
30
|
+
## Notices
|
|
31
|
+
|
|
32
|
+
You must ensure that anyone who gets a copy of any part of
|
|
33
|
+
the software from you also gets a copy of these terms or the
|
|
34
|
+
URL for them above, as well as copies of any plain-text lines
|
|
35
|
+
beginning with `Required Notice:` that the licensor provided
|
|
36
|
+
with the software. For example:
|
|
37
|
+
|
|
38
|
+
> Required Notice: Copyright MyERP.cz, Inc. (https://myerp.cz)
|
|
39
|
+
|
|
40
|
+
## Changes and New Works License
|
|
41
|
+
|
|
42
|
+
The licensor grants you an additional copyright license to
|
|
43
|
+
make changes and new works based on the software for any
|
|
44
|
+
permitted purpose.
|
|
45
|
+
|
|
46
|
+
## Patent License
|
|
47
|
+
|
|
48
|
+
The licensor grants you a patent license for the software
|
|
49
|
+
that covers patent claims the licensor can license, or
|
|
50
|
+
becomes able to license, that you would infringe by using
|
|
51
|
+
the software.
|
|
52
|
+
|
|
53
|
+
## Noncommercial Purposes
|
|
54
|
+
|
|
55
|
+
Any noncommercial purpose is a permitted purpose.
|
|
56
|
+
|
|
57
|
+
## Personal Uses
|
|
58
|
+
|
|
59
|
+
Personal use for research, experiment, and testing for the
|
|
60
|
+
benefit of public knowledge, personal study, private
|
|
61
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
62
|
+
observance, without any anticipated commercial application,
|
|
63
|
+
is use for a permitted purpose.
|
|
64
|
+
|
|
65
|
+
## Noncommercial Organizations
|
|
66
|
+
|
|
67
|
+
Use by any charitable organization, educational institution,
|
|
68
|
+
public research organization, public safety or health
|
|
69
|
+
organization, environmental protection organization, or
|
|
70
|
+
government institution is use for a permitted purpose
|
|
71
|
+
regardless of the source of funding or obligations resulting
|
|
72
|
+
from the funding.
|
|
73
|
+
|
|
74
|
+
## Fair Use
|
|
75
|
+
|
|
76
|
+
You may have "fair use" rights for the software under the
|
|
77
|
+
law. These terms do not limit them.
|
|
78
|
+
|
|
79
|
+
## No Other Rights
|
|
80
|
+
|
|
81
|
+
These terms do not allow you to sublicense or transfer any of
|
|
82
|
+
your licenses to anyone else, or prevent the licensor from
|
|
83
|
+
granting licenses to anyone else. These terms do not imply
|
|
84
|
+
any other licenses.
|
|
85
|
+
|
|
86
|
+
## Patent Defense
|
|
87
|
+
|
|
88
|
+
If you make any written claim that the software infringes or
|
|
89
|
+
contributes to infringement of any patent, your patent
|
|
90
|
+
license for the software granted under these terms ends
|
|
91
|
+
immediately. If your company makes such a claim, your patent
|
|
92
|
+
license ends immediately for work on behalf of your company.
|
|
93
|
+
|
|
94
|
+
## Violations
|
|
95
|
+
|
|
96
|
+
The first time you are notified in writing that you have
|
|
97
|
+
violated any of these terms, or done anything with the
|
|
98
|
+
software not covered by your licenses, your licenses can
|
|
99
|
+
nonetheless continue if you come into full compliance with
|
|
100
|
+
these terms, and take practical steps to correct past
|
|
101
|
+
violations, within 32 days of receiving notice. Otherwise,
|
|
102
|
+
all your licenses end immediately.
|
|
103
|
+
|
|
104
|
+
## No Liability
|
|
105
|
+
|
|
106
|
+
***As far as the law allows, the software comes as is,
|
|
107
|
+
without any warranty or condition, and the licensor will not
|
|
108
|
+
be liable to you for any damages arising out of these terms
|
|
109
|
+
or the use or nature of the software, under any kind of
|
|
110
|
+
legal claim.***
|
|
111
|
+
|
|
112
|
+
## Definitions
|
|
113
|
+
|
|
114
|
+
The **licensor** is the individual or entity offering these
|
|
115
|
+
terms, and the **software** is the software the licensor
|
|
116
|
+
makes available under these terms.
|
|
117
|
+
|
|
118
|
+
**You** refers to the individual or entity agreeing to these
|
|
119
|
+
terms.
|
|
120
|
+
|
|
121
|
+
**Your company** is any legal entity, sole proprietorship, or
|
|
122
|
+
other kind of organization that you work for, plus all
|
|
123
|
+
organizations that have control over, are under the control
|
|
124
|
+
of, or are under common control with that organization.
|
|
125
|
+
**Control** means ownership of substantially all the assets
|
|
126
|
+
of an entity, or the power to direct its management and
|
|
127
|
+
policies by vote, contract, or otherwise. Control can be
|
|
128
|
+
direct or indirect.
|
|
129
|
+
|
|
130
|
+
**Your licenses** are all the licenses granted to you for the
|
|
131
|
+
software under these terms.
|
|
132
|
+
|
|
133
|
+
**Use** means anything you do with the software requiring one
|
|
134
|
+
of your licenses.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: BI-analytics-admin
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python project for datascience, web, and MSSQL integration
|
|
5
|
+
Author-email: bluemoondom <pillerova@mojeit.eu>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
13
|
+
Requires-Dist: numpy>=1.24.0
|
|
14
|
+
Requires-Dist: pandas>=2.0.0
|
|
15
|
+
Requires-Dist: scipy>=1.10.0
|
|
16
|
+
Requires-Dist: scikit-learn>=1.3.0
|
|
17
|
+
Requires-Dist: matplotlib>=3.7.0
|
|
18
|
+
Requires-Dist: seaborn>=0.12.0
|
|
19
|
+
Requires-Dist: jupyter>=1.0.0
|
|
20
|
+
Requires-Dist: notebook>=6.5.0
|
|
21
|
+
Requires-Dist: fastapi>=0.95.0
|
|
22
|
+
Requires-Dist: uvicorn>=0.21.0
|
|
23
|
+
Requires-Dist: jinja2>=3.1.0
|
|
24
|
+
Requires-Dist: requests>=2.28.0
|
|
25
|
+
Requires-Dist: pyodbc>=4.0.0
|
|
26
|
+
Requires-Dist: sqlalchemy>=2.0.0
|
|
27
|
+
Requires-Dist: pymssql>=2.2.0
|
|
28
|
+
Requires-Dist: pymysql>=1.0.2
|
|
29
|
+
Requires-Dist: psycopg2-binary>=2.9.0
|
|
30
|
+
Requires-Dist: openpyxl>=3.1.0
|
|
31
|
+
Requires-Dist: python-dateutil>=2.8.0
|
|
32
|
+
Requires-Dist: tqdm>=4.65.0
|
|
33
|
+
Requires-Dist: cryptography>=41.0.0
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# Business Intelligence Analytics Admin — Features
|
|
37
|
+
|
|
38
|
+
## Overview
|
|
39
|
+
|
|
40
|
+
Analytics Admin is a multi-user business intelligence platform that allows organizations to connect to their databases, model data views, and build interactive dashboards. Each user operates within an isolated workspace, with dedicated connectors, views, and dashboards.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Multi-User Architecture
|
|
45
|
+
|
|
46
|
+
- Multi-user environment with separated connectors, views, and dashboards per user
|
|
47
|
+
- Account registration and authentication handled exclusively through email
|
|
48
|
+
- Multi-language interface support
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Database Connectors
|
|
53
|
+
|
|
54
|
+
- Supported database engines: Microsoft SQL Server, MySQL, MariaDB, PostgreSQL, and SQLite
|
|
55
|
+
- Allowed IP addresses configurable independently for each connector's API access
|
|
56
|
+
- API authentication via bearer key, with a configurable custom header name
|
|
57
|
+
- API tenant identifier for connector-level access control
|
|
58
|
+
- Configurable maximum request rate (requests per minute)
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## View Modeling
|
|
63
|
+
|
|
64
|
+
The view modeling layer allows users to define reusable data structures on top of source tables and views.
|
|
65
|
+
|
|
66
|
+
- Modeling based on tables and views, with support for subviews
|
|
67
|
+
- Selection of the source connector for each view
|
|
68
|
+
- One-click exposure of a view as an API endpoint
|
|
69
|
+
- API access supports GET requests in both tabular and tree (hierarchical) structures, as well as PUT requests
|
|
70
|
+
- Downloadable sample `.bat` script demonstrating API usage
|
|
71
|
+
- Renaming of tables and columns to custom aliases directly by clicking on the column header
|
|
72
|
+
- Color-coded visual indication when a subview is added to the model
|
|
73
|
+
- Column selection for inclusion in a view via checkboxes
|
|
74
|
+
- Visual display of join conditions between tables
|
|
75
|
+
- Support for adding custom columns and custom conditions, with built-in protection against SQL injection
|
|
76
|
+
- Enhanced graphical interface for building WHERE conditions
|
|
77
|
+
- Support for ORDER BY and GROUP BY clauses
|
|
78
|
+
- Automatic SQL query generation with syntax highlighting
|
|
79
|
+
- Live data preview
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Dashboards
|
|
84
|
+
|
|
85
|
+
- Tabular display of data sourced from a view
|
|
86
|
+
- Automatic removal of NULL values from displayed results
|
|
87
|
+
- Conditional formatting of numeric values: positive values shown in green, negative values shown in red
|
|
88
|
+
- Support for numeric and date/time formatting
|
|
89
|
+
- Configurable row limits
|
|
90
|
+
- Automatic detection of data types to generate appropriate filtering conditions for a view
|
|
91
|
+
|
|
92
|
+
### Pivot Tables
|
|
93
|
+
|
|
94
|
+
- Creation of pivot (cross-tabulated) tables
|
|
95
|
+
- Column hiding and reordering
|
|
96
|
+
- Configuration of pivot dimensions and aggregation functions: Sum, Count, Average, Maximum, and Minimum
|
|
97
|
+
- Display of columns that are neither assigned as dimensions nor as metrics
|
|
98
|
+
|
|
99
|
+
### Charts
|
|
100
|
+
|
|
101
|
+
- Chart creation from a library of 17 predefined chart types
|
|
102
|
+
- Configuration of X and Y axes, with support for additional series
|
|
103
|
+
- Each series can be independently defined as a column (bar) or a line
|
|
104
|
+
- Further breakdown of a series by an additional dimension, based on a selected column
|
|
105
|
+
- Ability to show or hide individual values in the chart legend
|
|
106
|
+
- Toggle for displaying or hiding gridlines
|
|
107
|
+
- Configuration of chart dimensions and layout, including the number of charts displayed per row
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Security
|
|
112
|
+
|
|
113
|
+
- Transport security via SSL, supporting both PEM and PFX certificate formats
|
|
114
|
+
- Globally configurable trusted hosts (allowed IP addresses)
|
|
115
|
+
- CORS, Content Security Policy (CSP), and HSTS enforcement
|
|
116
|
+
- Request and access logging
|
|
117
|
+
- JWT secret used for verification of web tokens
|
|
118
|
+
- API bearer key and tenant identifier configured individually for each user and each connector
|
|
119
|
+
- Trusted host IP addresses configurable independently for each connector
|
|
120
|
+
- Configurable maximum request rate (requests per minute)
|
|
121
|
+
- Registration and authentication via email, with session validity limited by a defined time period
|
|
122
|
+
- Prevention of duplicate concurrent sessions
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Requirements and Installation
|
|
127
|
+
|
|
128
|
+
The application is started with the following command:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
python -m src.web.server
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Dependencies
|
|
135
|
+
|
|
136
|
+
**Core**
|
|
137
|
+
- python-dotenv >= 1.0.0
|
|
138
|
+
|
|
139
|
+
**Data Science**
|
|
140
|
+
- numpy >= 1.24.0
|
|
141
|
+
- pandas >= 2.0.0
|
|
142
|
+
- scipy >= 1.10.0
|
|
143
|
+
- scikit-learn >= 1.3.0
|
|
144
|
+
- matplotlib >= 3.7.0
|
|
145
|
+
- seaborn >= 0.12.0
|
|
146
|
+
- jupyter >= 1.0.0
|
|
147
|
+
- notebook >= 6.5.0
|
|
148
|
+
|
|
149
|
+
**Web**
|
|
150
|
+
- fastapi >= 0.95.0
|
|
151
|
+
- uvicorn >= 0.21.0
|
|
152
|
+
- jinja2 >= 3.1.0
|
|
153
|
+
- requests >= 2.28.0
|
|
154
|
+
|
|
155
|
+
**Database**
|
|
156
|
+
- pyodbc >= 4.0.0 (MSSQL / SQL Server)
|
|
157
|
+
- sqlalchemy >= 2.0.0
|
|
158
|
+
- pymssql >= 2.2.0
|
|
159
|
+
- pymysql >= 1.0.2 (MySQL / MariaDB connector)
|
|
160
|
+
- psycopg2-binary >= 2.9.0 (PostgreSQL connector)
|
|
161
|
+
- sqlite3 (SQLite) is included in the Python standard library and requires no separate package
|
|
162
|
+
|
|
163
|
+
**Office / Export**
|
|
164
|
+
- openpyxl >= 3.1.0
|
|
165
|
+
|
|
166
|
+
**Utilities**
|
|
167
|
+
- python-dateutil >= 2.8.0
|
|
168
|
+
- tqdm >= 4.65.0
|
|
169
|
+
- cryptography >= 41.0.0 (PFX/PKCS12 extraction for HTTPS)
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Screenshots
|
|
174
|
+
|
|
175
|
+

|
|
176
|
+
|
|
177
|
+

|
|
178
|
+
|
|
179
|
+

|
|
180
|
+
|
|
181
|
+

|
|
182
|
+
|
|
183
|
+

|
|
184
|
+
|
|
185
|
+
---
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Business Intelligence Analytics Admin — Features
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Analytics Admin is a multi-user business intelligence platform that allows organizations to connect to their databases, model data views, and build interactive dashboards. Each user operates within an isolated workspace, with dedicated connectors, views, and dashboards.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Multi-User Architecture
|
|
10
|
+
|
|
11
|
+
- Multi-user environment with separated connectors, views, and dashboards per user
|
|
12
|
+
- Account registration and authentication handled exclusively through email
|
|
13
|
+
- Multi-language interface support
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Database Connectors
|
|
18
|
+
|
|
19
|
+
- Supported database engines: Microsoft SQL Server, MySQL, MariaDB, PostgreSQL, and SQLite
|
|
20
|
+
- Allowed IP addresses configurable independently for each connector's API access
|
|
21
|
+
- API authentication via bearer key, with a configurable custom header name
|
|
22
|
+
- API tenant identifier for connector-level access control
|
|
23
|
+
- Configurable maximum request rate (requests per minute)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## View Modeling
|
|
28
|
+
|
|
29
|
+
The view modeling layer allows users to define reusable data structures on top of source tables and views.
|
|
30
|
+
|
|
31
|
+
- Modeling based on tables and views, with support for subviews
|
|
32
|
+
- Selection of the source connector for each view
|
|
33
|
+
- One-click exposure of a view as an API endpoint
|
|
34
|
+
- API access supports GET requests in both tabular and tree (hierarchical) structures, as well as PUT requests
|
|
35
|
+
- Downloadable sample `.bat` script demonstrating API usage
|
|
36
|
+
- Renaming of tables and columns to custom aliases directly by clicking on the column header
|
|
37
|
+
- Color-coded visual indication when a subview is added to the model
|
|
38
|
+
- Column selection for inclusion in a view via checkboxes
|
|
39
|
+
- Visual display of join conditions between tables
|
|
40
|
+
- Support for adding custom columns and custom conditions, with built-in protection against SQL injection
|
|
41
|
+
- Enhanced graphical interface for building WHERE conditions
|
|
42
|
+
- Support for ORDER BY and GROUP BY clauses
|
|
43
|
+
- Automatic SQL query generation with syntax highlighting
|
|
44
|
+
- Live data preview
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Dashboards
|
|
49
|
+
|
|
50
|
+
- Tabular display of data sourced from a view
|
|
51
|
+
- Automatic removal of NULL values from displayed results
|
|
52
|
+
- Conditional formatting of numeric values: positive values shown in green, negative values shown in red
|
|
53
|
+
- Support for numeric and date/time formatting
|
|
54
|
+
- Configurable row limits
|
|
55
|
+
- Automatic detection of data types to generate appropriate filtering conditions for a view
|
|
56
|
+
|
|
57
|
+
### Pivot Tables
|
|
58
|
+
|
|
59
|
+
- Creation of pivot (cross-tabulated) tables
|
|
60
|
+
- Column hiding and reordering
|
|
61
|
+
- Configuration of pivot dimensions and aggregation functions: Sum, Count, Average, Maximum, and Minimum
|
|
62
|
+
- Display of columns that are neither assigned as dimensions nor as metrics
|
|
63
|
+
|
|
64
|
+
### Charts
|
|
65
|
+
|
|
66
|
+
- Chart creation from a library of 17 predefined chart types
|
|
67
|
+
- Configuration of X and Y axes, with support for additional series
|
|
68
|
+
- Each series can be independently defined as a column (bar) or a line
|
|
69
|
+
- Further breakdown of a series by an additional dimension, based on a selected column
|
|
70
|
+
- Ability to show or hide individual values in the chart legend
|
|
71
|
+
- Toggle for displaying or hiding gridlines
|
|
72
|
+
- Configuration of chart dimensions and layout, including the number of charts displayed per row
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Security
|
|
77
|
+
|
|
78
|
+
- Transport security via SSL, supporting both PEM and PFX certificate formats
|
|
79
|
+
- Globally configurable trusted hosts (allowed IP addresses)
|
|
80
|
+
- CORS, Content Security Policy (CSP), and HSTS enforcement
|
|
81
|
+
- Request and access logging
|
|
82
|
+
- JWT secret used for verification of web tokens
|
|
83
|
+
- API bearer key and tenant identifier configured individually for each user and each connector
|
|
84
|
+
- Trusted host IP addresses configurable independently for each connector
|
|
85
|
+
- Configurable maximum request rate (requests per minute)
|
|
86
|
+
- Registration and authentication via email, with session validity limited by a defined time period
|
|
87
|
+
- Prevention of duplicate concurrent sessions
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Requirements and Installation
|
|
92
|
+
|
|
93
|
+
The application is started with the following command:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
python -m src.web.server
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Dependencies
|
|
100
|
+
|
|
101
|
+
**Core**
|
|
102
|
+
- python-dotenv >= 1.0.0
|
|
103
|
+
|
|
104
|
+
**Data Science**
|
|
105
|
+
- numpy >= 1.24.0
|
|
106
|
+
- pandas >= 2.0.0
|
|
107
|
+
- scipy >= 1.10.0
|
|
108
|
+
- scikit-learn >= 1.3.0
|
|
109
|
+
- matplotlib >= 3.7.0
|
|
110
|
+
- seaborn >= 0.12.0
|
|
111
|
+
- jupyter >= 1.0.0
|
|
112
|
+
- notebook >= 6.5.0
|
|
113
|
+
|
|
114
|
+
**Web**
|
|
115
|
+
- fastapi >= 0.95.0
|
|
116
|
+
- uvicorn >= 0.21.0
|
|
117
|
+
- jinja2 >= 3.1.0
|
|
118
|
+
- requests >= 2.28.0
|
|
119
|
+
|
|
120
|
+
**Database**
|
|
121
|
+
- pyodbc >= 4.0.0 (MSSQL / SQL Server)
|
|
122
|
+
- sqlalchemy >= 2.0.0
|
|
123
|
+
- pymssql >= 2.2.0
|
|
124
|
+
- pymysql >= 1.0.2 (MySQL / MariaDB connector)
|
|
125
|
+
- psycopg2-binary >= 2.9.0 (PostgreSQL connector)
|
|
126
|
+
- sqlite3 (SQLite) is included in the Python standard library and requires no separate package
|
|
127
|
+
|
|
128
|
+
**Office / Export**
|
|
129
|
+
- openpyxl >= 3.1.0
|
|
130
|
+
|
|
131
|
+
**Utilities**
|
|
132
|
+
- python-dateutil >= 2.8.0
|
|
133
|
+
- tqdm >= 4.65.0
|
|
134
|
+
- cryptography >= 41.0.0 (PFX/PKCS12 extraction for HTTPS)
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Screenshots
|
|
139
|
+
|
|
140
|
+

|
|
141
|
+
|
|
142
|
+

|
|
143
|
+
|
|
144
|
+

|
|
145
|
+
|
|
146
|
+

|
|
147
|
+
|
|
148
|
+

|
|
149
|
+
|
|
150
|
+
---
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "BI-analytics-admin"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Python project for datascience, web, and MSSQL integration"
|
|
9
|
+
authors = [{name = "bluemoondom", email = "pillerova@mojeit.eu"}]
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
requires-python = ">=3.8"
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
]
|
|
17
|
+
dynamic = ["dependencies"]
|
|
18
|
+
|
|
19
|
+
[project.scripts]
|
|
20
|
+
BI-analytics-admin = "web.server:main"
|
|
21
|
+
|
|
22
|
+
[tool.setuptools.dynamic]
|
|
23
|
+
dependencies = {file = ["requirements.txt"]}
|
|
24
|
+
|
|
25
|
+
[tool.setuptools.packages.find]
|
|
26
|
+
where = ["src"]
|
|
27
|
+
|
|
28
|
+
[tool.pytest.ini_options]
|
|
29
|
+
pythonpath = ["."]
|
|
30
|
+
#testpaths = ["tests"]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Core
|
|
2
|
+
python-dotenv>=1.0.0
|
|
3
|
+
|
|
4
|
+
# Data Science
|
|
5
|
+
numpy>=1.24.0
|
|
6
|
+
pandas>=2.0.0
|
|
7
|
+
scipy>=1.10.0
|
|
8
|
+
scikit-learn>=1.3.0
|
|
9
|
+
matplotlib>=3.7.0
|
|
10
|
+
seaborn>=0.12.0
|
|
11
|
+
jupyter>=1.0.0
|
|
12
|
+
notebook>=6.5.0
|
|
13
|
+
|
|
14
|
+
# Web
|
|
15
|
+
fastapi>=0.95.0
|
|
16
|
+
uvicorn>=0.21.0
|
|
17
|
+
jinja2>=3.1.0
|
|
18
|
+
requests>=2.28.0
|
|
19
|
+
|
|
20
|
+
# Database
|
|
21
|
+
pyodbc>=4.0.0 # MSSQL (SQL Server)
|
|
22
|
+
sqlalchemy>=2.0.0
|
|
23
|
+
pymssql>=2.2.0
|
|
24
|
+
pymysql>=1.0.2 # MySQL / MariaDB connector
|
|
25
|
+
psycopg2-binary>=2.9.0 # PostgreSQL connector
|
|
26
|
+
# sqlite3 (SQLite) is part of Python's stdlib; no package needed.
|
|
27
|
+
|
|
28
|
+
# Office / export
|
|
29
|
+
openpyxl>=3.1.0
|
|
30
|
+
|
|
31
|
+
# Utilities
|
|
32
|
+
python-dateutil>=2.8.0
|
|
33
|
+
tqdm>=4.65.0
|
|
34
|
+
cryptography>=41.0.0 # PFX/PKCS12 extraction for HTTPS
|