-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaces.tex
18 lines (16 loc) · 1.6 KB
/
interfaces.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
% !TEX root = Documentation.tex
\chapter{Interfaces}
The interfaces to the database are largely written in Python3 and implemented to act independent from the user interface. This separation should minimize ressource conflicts between the user
interface and the database interfaces, if large files are processed. As the files are largely written in Python3, the coding style is oriented on the recommendations from
\href{https://dev.mysql.com/doc/connector-python/en/}{\textit{MySQL developer guide}}. The connection to the database is established with MySQL Connector, which has to be installed separetely on Ubuntu
systems (see the \hyperref[Database installation and configuration]{\textit{database section}}).
As a security measure and to ensure easy enrolling of code in different environments, the provision of database access credentials to the code is done with separate files. The selected option is to
provide the credentials from a *.json file, which is evaluated with the native json library in Python3. In the next step, the connection to the database is established within the corresponding
function.\\
\section{REST API}
To allow access to information stored on external servers, a REST API can be used to connect to given accounts on remote servers. The required login information can be provided in the \emph{database-update.php} form. As already indicated, the REST API itself is not based on the web process, which is written in PHP, but is based on Python3.\\
\paragraph{smaXtec}
The smaXtec API requests the following data for all animals, which appear in its database:
\begin{itemize}
\item
\end{itemize}