mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 22:54:23 +01:00
Moves cli conf options to __init__.py so it can be run standalone
This commit is contained in:
@@ -1,2 +1,10 @@
|
|||||||
|
# PISA-SERVER
|
||||||
DEFAULT_PISA_API_SERVER = 'localhost'
|
DEFAULT_PISA_API_SERVER = 'localhost'
|
||||||
DEFAULT_PISA_API_PORT = 9814
|
DEFAULT_PISA_API_PORT = 9814
|
||||||
|
|
||||||
|
# PISA-CLI
|
||||||
|
CLIENT_LOG_FILE = 'pisa.log'
|
||||||
|
|
||||||
|
# CRYPTO
|
||||||
|
SUPPORTED_HASH_FUNCTIONS = ["SHA256"]
|
||||||
|
SUPPORTED_CIPHERS = ["AES-GCM-128"]
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
from binascii import hexlify, unhexlify
|
from binascii import hexlify, unhexlify
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
||||||
from conf import SUPPORTED_HASH_FUNCTIONS, SUPPORTED_CIPHERS
|
from apps.cli import SUPPORTED_HASH_FUNCTIONS, SUPPORTED_CIPHERS
|
||||||
|
|
||||||
|
|
||||||
class Blob:
|
class Blob:
|
||||||
|
|||||||
@@ -6,12 +6,11 @@ import logging
|
|||||||
import requests
|
import requests
|
||||||
from sys import argv
|
from sys import argv
|
||||||
from getopt import getopt, GetoptError
|
from getopt import getopt, GetoptError
|
||||||
from conf import CLIENT_LOG_FILE
|
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
from binascii import unhexlify
|
from binascii import unhexlify
|
||||||
from apps.cli.blob import Blob
|
from apps.cli.blob import Blob
|
||||||
from requests import ConnectTimeout, ConnectionError
|
from requests import ConnectTimeout, ConnectionError
|
||||||
from apps.cli import DEFAULT_PISA_API_SERVER, DEFAULT_PISA_API_PORT
|
from apps.cli import DEFAULT_PISA_API_SERVER, DEFAULT_PISA_API_PORT, CLIENT_LOG_FILE
|
||||||
from apps.cli.help import help_add_appointment, help_get_appointment
|
from apps.cli.help import help_add_appointment, help_get_appointment
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user