better __all__

This commit is contained in:
AF 2022-12-28 07:35:18 +00:00
parent ba84d6375a
commit 9ada50f111
9 changed files with 15 additions and 16 deletions

View File

@ -1,3 +1,3 @@
aiohttp aiohttp
PyNaCl~=1.4.0 PyNaCl~=1.4.0
v6d0auth[full] @ git+https://gitea.parrrate.ru/PTV/v6d0auth.git@324236f435c92756aefe22877a97a906c462ef2c v6d0auth[full] @ git+https://gitea.parrrate.ru/PTV/v6d0auth.git@c718d4d1422945a756213d22d9e26aa24babe0f6

View File

@ -15,7 +15,7 @@ setup(
], ],
extras_require={ extras_require={
'full': [ 'full': [
'v6d0auth[full] @ git+https://gitea.parrrate.ru/PTV/v6d0auth.git@324236f435c92756aefe22877a97a906c462ef2c', 'v6d0auth[full] @ git+https://gitea.parrrate.ru/PTV/v6d0auth.git@c718d4d1422945a756213d22d9e26aa24babe0f6',
], ],
}, },
) )

View File

@ -5,11 +5,11 @@ from nacl.exceptions import BadSignatureError
from nacl.public import PublicKey from nacl.public import PublicKey
from nacl.signing import VerifyKey from nacl.signing import VerifyKey
from nacl.utils import random from nacl.utils import random
from v6d0auth import certs
from v6d0auth.appfactory import AppFactory
from v6d0auth.client import has_role
from v6d1tokens.tdb import TDB from v6d0auth import certs
from v6d0auth.appfactory import *
from v6d0auth.client import *
from v6d1tokens.tdb import *
__all__ = ('V6D1TokensAppFactory',) __all__ = ('V6D1TokensAppFactory',)

View File

@ -2,9 +2,9 @@ import json
from typing import Optional from typing import Optional
import aiohttp import aiohttp
from v6d0auth import certs
from v6d0auth.client import mycert, with_role
from v6d0auth import certs
from v6d0auth.client import *
from v6d1tokens.config import taurl from v6d1tokens.config import taurl
__all__ = ('request_token',) __all__ = ('request_token',)

View File

@ -1,6 +1,6 @@
import os import os
from v6d0auth.config import root, port from v6d0auth.config import port, root
__all__ = ('myroot', 'taurl',) __all__ = ('myroot', 'taurl',)

View File

@ -2,13 +2,13 @@ import asyncio
import json import json
import aiohttp import aiohttp
from v6d0auth import certs from v6d0auth import certs
from v6d0auth.config import host, port from v6d0auth.config import host, port
async def main(): async def main():
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
# noinspection HttpUrlsUsage
async with session.ws_connect(f'http://{host}:{port}/reg') as ws: async with session.ws_connect(f'http://{host}:{port}/reg') as ws:
nonce = await ws.receive_bytes() nonce = await ws.receive_bytes()
await ws.send_bytes(certs.sign(json.dumps([[input('token_id:'), input('token:')], nonce.hex()]).encode())) await ws.send_bytes(certs.sign(json.dumps([[input('token_id:'), input('token:')], nonce.hex()]).encode()))

View File

@ -1,9 +1,8 @@
import asyncio import asyncio
from v6d0auth.run_app import run_app from v6d0auth.run_app import *
from v6d1tokens.app import *
from v6d1tokens.app import V6D1TokensAppFactory from v6d1tokens.tdb import *
from v6d1tokens.tdb import TDB
async def main(): async def main():

View File

@ -1,8 +1,8 @@
from typing import Optional from typing import Optional
from nacl.public import PublicKey, SealedBox from nacl.public import PublicKey, SealedBox
from ptvp35 import Db, KVJson
from ptvp35 import *
from v6d1tokens.config import myroot from v6d1tokens.config import myroot
__all__ = ('TDB',) __all__ = ('TDB',)

View File

@ -1,6 +1,6 @@
import asyncio import asyncio
from v6d1tokens.client import request_token from v6d1tokens.client import *
async def main(): async def main():