https://github.com/gtsop/contact-us
Minimal micro-service for contact forms
https://github.com/gtsop/contact-us
Last synced: 3 months ago
JSON representation
Minimal micro-service for contact forms
- Host: GitHub
- URL: https://github.com/gtsop/contact-us
- Owner: gtsop
- License: gpl-3.0
- Created: 2023-02-09T10:23:02.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-15T00:19:56.000Z (over 2 years ago)
- Last Synced: 2025-01-08T09:11:44.395Z (5 months ago)
- Language: Python
- Size: 78.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# contact-us
## What does it do?
`contact-us` is a microservice to handle contact form requests.
E.g: You have a contact form in your website and you need some backend code to actually receive the request and send you the message via email or other means. `contact-us` is the standalone solution for you.
## How does it do it?
`contact-us` provides an API for sending information such as email, name, phone, message body and then transmits these messages via email (or any other means)
## Instalation
As of this point in time, installation from source is the only option. The plan is to release it as a python package and also provide a docker image.
### Instalation from source
```
git clone https://github.com/gtsop/contact-us.git
cd contact-us
pip install .
```## Configuration
### Storage
The default configuration option uses an in-memory database which won't be a reasonable option for production, but helps you validate the application has been installed succesfully.
`contact-us` is tested to be working with `sqlite`. In order to configure a permanent storage file provide this environment variable:
```
export STORAGE_DB_URI="sqlite:///.local.db"
```## CLI usage
A quick way to test the workings of this application is to use it's cli, for instance try this:
```
contact-us create-message [email protected] "hello world"
contact-us list-messages
contact-us create-message [email protected] "goodbye world"
contact-us list-messages
contact-us send-message 2
contact-us list-messages
```