Django app wrapping the MailUp Python client
Project description
django-mailupy
Django wrapper for the Mailupy client.
Overview
django-mailupy is a Django app that wraps the Mailupy Python client, providing seamless integration with Django projects. It stores MailUp credentials in the database in a single instance and exposes API endpoints for credential management.
Features
- Stores MailUp credentials securely in the database
- Provides Django REST Framework viewsets and serializers for credential management
- Exposes MailUp client methods via Django
Requirements
- Python >= 3.9
- Django >= 4.2
- mailupy >= 1.1.4
- (Optional) djangorestframework >= 3.12 for API features
Installation
pip install django-mailupy
Or add to your pyproject.toml dependencies:
django-mailupy = ">=0.1.0"
Setup
-
Add
django_mailupyto yourINSTALLED_APPSinsettings.py:INSTALLED_APPS = [ # ...existing apps... 'django_mailupy', ]
-
Run migrations to create the credentials table:
python manage.py migrate
-
(Optional) Add the API URLs to your project:
# in your urls.py path('mailupy/', include('django_mailupy.urls')),
Usage
-
Store your MailUp credentials using the admin or API.
-
Initialize the
DjangoMailupyclient in your code:from django_mailupy.client import DjangoMailupy client = DjangoMailupy(client_id="your_client_id", client_secret="your_client_secret")
-
Django Mailupy stores only one set of credentials and only username and password to ensure security, since client ID and secret can be hardcoded or managed via environment variables and do not change often.
Example
-
The library contains a simple example app that demonstrates how to use the client and API. You can run it with:
python manage.py runserver
inside the example directory.
Project Structure
django-mailupy
├─ LICENSE
├─ README.md
├─ example
│ ├─ config
│ │ ├─ __init__.py
│ │ ├─ settings.py
│ │ ├─ urls.py
│ │ ├─ views.py
│ │ └─ wsgi.py
│ └─ manage.py
├─ pyproject.toml
└─ src
└─ django_mailupy
├─ __init__.py
├─ admin.py
├─ apps.py
├─ client.py
├─ migrations
│ ├─ 0001_initial.py
│ └─ __init__.py
├─ models.py
├─ serializers.py
├─ urls.py
└─ viewsets.py
License
MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_mailupy-0.1.0.tar.gz.
File metadata
- Download URL: django_mailupy-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92470ad93c1677dd66b22f36c3484eb53889b3268505bf15ffad23af86066417
|
|
| MD5 |
7cf7f0d0e9aaeef48feef111fd5fda23
|
|
| BLAKE2b-256 |
331c6afcd5b5f5ea169ce3e2a28b7650c3a6cb274fe353662b5512cd6bef38e1
|
File details
Details for the file django_mailupy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_mailupy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1673a779884072c5210757fd74183b22eab8abfb240fe720764649280e9c4570
|
|
| MD5 |
9fb16e3d15b22bfa34e1d673e8ac723e
|
|
| BLAKE2b-256 |
6c5679f03694a1f005296c54a24fb86e7f004993a0947de82cf2333137495418
|