PyDATEV
A Python library and FastAPI/Streamlit application that provides a unified interface for interacting with DATEV's various API services. This library integrates multiple DATEV APIs including accounting, HR, payroll, and cash register services.
Features
- Authentication: OAuth2 integration with DATEV's authentication system
- Client Management: View and manage DATEV clients
- Document Management: Upload and manage documents
- HR Services:
- eAU (electronic Certificate of Incapacity for Work) management
- Employee data access
- Payroll reporting
- Cash Register Integration: Manage cash register data and tenants
- Master Data Management: Search and manage master client data
- Interactive Dashboard: User-friendly Streamlit interface for all services
Prerequisites
- Python 3.8+
- DATEV API credentials (Client ID and Client Secret)
- Valid DATEV account with appropriate permissions
Installation
- Clone the repository:
git clone https://github.com/superpandas-ai/pydatev.git
cd pydatev
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the package in development mode:
pip install -e .
- Create a
.envfile in the root directory with your DATEV credentials:
DATEV_CLIENT_ID=your_client_id
DATEV_CLIENT_SECRET=your_client_secret
DATEV_REDIRECT_URI=http://localhost:8501/callback
- Create a
.streamlit/secrets.tomlfile with your OAuth credentials:
[oauth]
client_id = "your_client_id"
client_secret = "your_client_secret"
Project Structure
pydatev/
├── src/
│ └── pydatev/
│ ├── app/
│ │ ├── models/
│ │ │ └── __init__.py
│ │ └── __init__.py
│ └── __init__.py
├── tests/
│ └── conftest.py
├── setup.py
├── pytest.ini
├── .env
└── README.md
Running the Application
- Start the FastAPI backend:
uvicorn pydatev.app.main:app --reload
- In a separate terminal, start the Streamlit frontend:
streamlit run pydatev/app/frontend.py
- Access the application:
- Frontend Dashboard: http://localhost:8501
- API Documentation: http://localhost:8000/docs
Using the Library
from pydatev import DATEVClient
# Initialize the client
client = DATEVClient(client_id="your_client_id", client_secret="your_client_secret")
# Use the client to interact with DATEV APIs
clients = client.get_clients()
API Structure
The application provides endpoints for various DATEV services:
/clients/*- Client management endpoints/documents/*- Document management/hr/*- HR-related services/tenants/*- Cash register management/master-clients/*- Master data management/payrollreports/*- Payroll reporting
For detailed API documentation, visit the Swagger UI at /docs when running the application.
Testing
Run the tests using pytest:
pytest
Authentication
The library and application use OAuth2 for authentication with DATEV's services. Users need to:
- Log in through the Streamlit interface or initialize the client with credentials
- Authorize the application
- Handle the OAuth callback
- Use the received token for API requests
Error Handling
The library includes comprehensive error handling for:
- Authentication failures
- API request errors
- Invalid data submissions
- Token expiration
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
[Add your license information here]
Support
For support, please create an issue in the repository.
Acknowledgments
- DATEV for providing the API services
- FastAPI and Streamlit communities
Metadata
Release files for pydatev 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydatev-0.1.0.tar.gz | 143.6 kB | Without provenance | Details for pydatev-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydatev-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pydatev-0.1.0-py3-none-any.whl |
Total release size: 163.9 kB
Release files / pydatev-0.1.0.tar.gz
| Download URL | pydatev-0.1.0.tar.gz |
|---|---|
| Size | 143.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f723a92ee3c7ad3127b621874b91e430a9a5bb32755b469351cb75b4ba44e2e
|
|
BLAKE2b-256 checksum How to use checksums |
ed2c01fd86b7d8a003b621182c20e49b287785a83ec298fe588d109762ef7742
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / pydatev-0.1.0-py3-none-any.whl
| Download URL | pydatev-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
627c589cb70dd999c870789b1eeece4cdcc50c1b8b83e71989b8717b68edba05
|
|
BLAKE2b-256 checksum How to use checksums |
95bafabd2c382deab12d70e2857553a855d8d79ac49bd64f0a4eebf38c232722
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for pydatev 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.