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',
| | | |