czds

- ICANN Centralized Zone Data Service Tool
git clone git://git.acid.vegas/czds.git
Log | Files | Refs | Archive | README | LICENSE

commit 6047e0aed73fb318e23c5ea32b9e6344bd30aaf2
parent 6cd0d267d1af0122ff09bf9cc0ff98778df0041f
Author: acidvegas <acid.vegas@acid.vegas>
Date: Fri, 21 Mar 2025 20:17:29 -0400

Fixed aenter

Diffstat:
M.gitignore | 4++--
Mczds/__init__.py | 2+-
Mczds/client.py | 8++++++++
Msetup.py | 2+-

4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
@@ -4,4 +4,5 @@ logs/*
 *.log
 .log. 
 *.egg-info
-dist/
-\ No newline at end of file
+dist/
+zones/
diff --git a/czds/__init__.py b/czds/__init__.py
@@ -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'
 \ No newline at end of file
diff --git a/czds/client.py b/czds/client.py
@@ -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'''
diff --git a/setup.py b/setup.py
@@ -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',