Skip to content

Commit 6ab78d4

Browse files
author
stanislav-web
committed
Revert "[build] #16 add documentation"
This reverts commit 7265cf2
1 parent 7265cf2 commit 6ab78d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+98
-113
lines changed

README.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
### PyRuc (Python Redis Users Controller)
2-
PyRuc is the service for maintaining new and existing users accounts
3-
1+
### PyRuc is the service for maintaining user accounts (UAC)
42
[![Coverage Status](https://coveralls.io/repos/github/stanislav-web/PyRuc/badge.svg?branch=master)](https://coveralls.io/github/stanislav-web/PyRuc?branch=master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/810e623b6db74357ba10915f4247aa6d)](https://www.codacy.com/app/stanisov/PyRuc?utm_source=github.com&utm_medium=referral&utm_content=stanislav-web/PyRuc&utm_campaign=Badge_Grade) [![GitHub license](https://img.shields.io/github/license/stanislav-web/PyRuc.svg)](https://github.com/stanislav-web/PyRuc/blob/master/LICENSE)
53

64
| Python | Status |
@@ -22,44 +20,36 @@ PyRuc is the service for maintaining new and existing users accounts
2220
- Gevent as default async worker for Gunicorn
2321
- Python flask
2422
- Twilio SMS notifier
25-
- Logstash client as logs filter to Elastic
23+
- ELK client for as log transport
2624
- JWT authentication
2725
- Redis as persistent user's storage
2826

29-
##### Configuration
30-
```bash
31-
/app/env/development.env
32-
/app/env/production.env
33-
```
34-
You also could setup your build out of the docker container.
35-
Please install `dotenv` pip package for realize your custom environments
36-
3727
##### Installation
3828
- Docker
3929
```bash
4030

4131
# ENV development: using /app/env/development.env
42-
> docker-compose --file docker-compose.dev.yml up --build
32+
docker-compose --file docker-compose.dev.yml up --build
4333

4434
# ENV production: using /app/env/production.env
45-
> docker-compose --file docker-compose.prod.yml up --build
35+
docker-compose --file docker-compose.prod.yml up --build
36+
4637
```
4738
- Manualy & Run
4839
```bash
49-
> cd app
50-
> pip install -r requirements.txt
51-
> gunicorn -c config.py server --reload
40+
pip install -r requirements.txt
41+
gunicorn -c config.py server --reload
5242
```
53-
5443
##### Try API
5544
[http://drunk-start.surge.sh](http://drunk-start.surge.sh)
5645

46+
5747
##### Diagrams
5848
![Registration](images/registration.png)
5949
![Authentication](images/authentication.png)
6050
![Restore](images/restore.png)
6151

6252
#### Tests
6353
```bash
64-
> cd app && coverage run setup.py test
65-
```
54+
cd app && coverage run setup.py test
55+
```

app/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
""" PyRuc-Python Redis User Controller
3+
""" PyRuc-UAC-SERVICE
44
Copyright (C) 2007 Free Software Foundation, Inc.
55
Everyone is permitted to copy and distribute verbatim copies of this license document,
66
but changing it is not allowed.

app/env/production.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ SERVER_PORT=5001
2020

2121
REDIS_HOST=redis
2222
REDIS_PORT=6379
23-
REDIS_DBNO=1
2423
REDIS_PASSWORD=d70e25e734dedbd1ca52fe81459b23af88f82819d06a823e07a79a86955e8ac8
24+
REDIS_DBNO=1
2525
REDIS_SOCKET_TIMEOUT=10
2626
REDIS_SOCKET_CONNECT_TIMEOUT=3
2727
REDIS_MAX_CONNECTIONS=3

app/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

4-
""" PyRuc-Python Redis Users Controller
4+
""" PyRuc-UAC-SERVICE
55
Copyright (C) 2007 Free Software Foundation, Inc.
66
Everyone is permitted to copy and distribute verbatim copies of this license document,
77
but changing it is not allowed.

app/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

4-
""" PyRuc-Python Redis Users Controller
4+
""" PyRuc-UAC-SERVICE
55
Copyright (C) 2007 Free Software Foundation, Inc.
66
Everyone is permitted to copy and distribute verbatim copies of this license document,
77
but changing it is not allowed.

app/src/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
""" PyRuc-Python Redis Users Controller
3+
""" PyRuc-UAC-SERVICE
44
Copyright (C) 2007 Free Software Foundation, Inc.
55
Everyone is permitted to copy and distribute verbatim copies of this license document,
66
but changing it is not allowed.

app/src/app.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
""" PyRuc-Python Redis Users Controller
3+
""" PyRuc-UAC-SERVICE
44
Copyright (C) 2007 Free Software Foundation, Inc.
55
Everyone is permitted to copy and distribute verbatim copies of this license document,
66
but changing it is not allowed.
@@ -23,11 +23,7 @@
2323
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
2424
logger = logging.getLogger(config.APPLICATION)
2525
logger.setLevel(config.APPLICATION_LOG_LEVEL)
26-
logger.addHandler(logstash.TCPLogstashHandler(config.LOGSTASH_HOST,
27-
config.LOGSTASH_PORT,
28-
message_type=config.LOGSTASH_NODENAME,
29-
fqdn=True,
30-
version=1))
26+
logger.addHandler(logstash.TCPLogstashHandler(config.LOGSTASH_HOST, config.LOGSTASH_PORT, version=1))
3127

3228
try:
3329
application = Flask(config.APPLICATION)

app/src/config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
""" PyRuc-Python Redis Users Controller
3+
""" PyRuc-UAC-SERVICE
44
Copyright (C) 2007 Free Software Foundation, Inc.
55
Everyone is permitted to copy and distribute verbatim copies of this license document,
66
but changing it is not allowed.
@@ -18,5 +18,4 @@
1818
APPLICATION_LIMIT_PER_MIN = os.getenv('APPLICATION_LIMIT_PER_MIN', '100000 per minute')
1919
APPLICATION_LIMIT_STORAGE_URI = os.getenv('APPLICATION_LIMIT_STORAGE_URI', 'redis://127.0.0.1:6379')
2020
LOGSTASH_HOST = os.getenv('LOGSTASH_HOST', '127.0.0.1')
21-
LOGSTASH_PORT = int(os.getenv('LOGSTASH_PORT', 6000))
22-
LOGSTASH_NODENAME = os.getenv('LOGSTASH_NODENAME', 'pyruc')
21+
LOGSTASH_PORT = os.getenv('LOGSTASH_PORT', 6000)

app/src/modules/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
""" PyRuc-Python Redis Users Controller
3+
""" PyRuc-UAC-SERVICE
44
Copyright (C) 2007 Free Software Foundation, Inc.
55
Everyone is permitted to copy and distribute verbatim copies of this license document,
66
but changing it is not allowed.

app/src/modules/mod_authentication/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
""" PyRuc-Python Redis Users Controller
3+
""" PyRuc-UAC-SERVICE
44
Copyright (C) 2007 Free Software Foundation, Inc.
55
Everyone is permitted to copy and distribute verbatim copies of this license document,
66
but changing it is not allowed.

0 commit comments

Comments
 (0)