Fixed aenter

This commit is contained in:
Dionysus 2025-03-21 20:17:29 -04:00
parent 6cd0d267d1
commit 6047e0aed7
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
4 changed files with 12 additions and 3 deletions

3
.gitignore vendored
View File

@ -4,4 +4,5 @@ logs/*
*.log
.log.
*.egg-info
dist/
dist/
zones/

View File

@ -5,7 +5,7 @@
from .client import CZDS
__version__ = '1.2.5'
__version__ = '1.2.6'
__author__ = 'acidvegas'
__email__ = 'acid.vegas@acid.vegas'
__github__ = 'https://github.com/acidvegas/czds'

View File

@ -40,6 +40,14 @@ class CZDS:
logging.info('Initialized CZDS client')
async def __aenter__(self):
'''Async context manager entry'''
await self.authenticate()
return self
async def __aexit__(self, exc_type, exc_val, exc_tb):
'''Async context manager exit'''
await self.close()
async def close(self):
'''Close the client session'''

View File

@ -11,7 +11,7 @@ with open('README.md', 'r', encoding='utf-8') as fh:
setup(
name='czds-api',
version='1.2.5',
version='1.2.6',
author='acidvegas',
author_email='acid.vegas@acid.vegas',
description='ICANN API for the Centralized Zones Data Service',