Skip to content

Commit

Permalink
Update get_ftp_connection in ds_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
tim.reichard committed May 5, 2022
1 parent fe39339 commit 6b7ff51
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
11 changes: 11 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ History
=======


v0.17.8 (2022-05-05)

* Update get_ftp_connection function in ds_utils to allow configuration of is_direct_tcp.
* Update ddtrace==1.1.1.
* Update flask==2.1.2.
* Update orjson==3.6.8.
* Update pre-commit==2.19.0.
* Update pylint==2.13.8.
* Update pytest==7.1.2.


v0.17.7 (2022-05-03)

* Add update_secret function to ds_utils.
Expand Down
11 changes: 9 additions & 2 deletions aioradio/ds_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,19 @@ def get_s3_pickle_to_object(s3_client, s3_bucket, key):
return data


def get_ftp_connection(secret_id, port=139):
def get_ftp_connection(secret_id, port=139, is_direct_tcp=False):
"""Get SMB Connection."""

secret_client = get_boto3_session(ENV).client("secretsmanager", region_name='us-east-1')
creds = json.loads(secret_client.get_secret_value(SecretId=secret_id)['SecretString'])
conn = SMBConnection(creds['user'], creds['password'], secret_id, creds['server'], use_ntlm_v2=True)
conn = SMBConnection(
creds['user'],
creds['password'],
secret_id,
creds['server'],
use_ntlm_v2=True,
is_direct_tcp=is_direct_tcp
)
conn.connect(creds['server'], port)

return conn
Expand Down
12 changes: 6 additions & 6 deletions aioradio/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ aioboto3==9.5.0
aiobotocore==2.2.0
aiojobs==0.3.0
boto3==1.21.21
ddtrace==1.0.0
ddtrace==1.1.1
dominodatalab==1.0.7
fakeredis==1.7.1
flask==2.1.1
flask==2.1.2
flask-cors==3.0.10
httpx==0.22.0
mandrill==1.0.60
moto==3.0.3
orjson==3.6.7
orjson==3.6.8
pandas==1.4.2
pre-commit==2.17.0
pre-commit==2.19.0
psycopg2-binary==2.9.3
pylint==2.13.4
pylint==2.13.8
pyodbc==4.0.32
pysmb==1.2.7
pytest==7.1.1
pytest==7.1.2
pytest-asyncio==0.18.3
pytest-cov==3.0.0
python-json-logger==2.0.2
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
long_description = fileobj.read()

setup(name='aioradio',
version='0.17.7',
version='0.17.8',
description='Generic asynchronous i/o python utilities for AWS services (SQS, S3, DynamoDB, Secrets Manager), Redis, MSSQL (pyodbc), JIRA and more',
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -30,7 +30,7 @@
'httpx>=0.19.0',
'mandrill>=1.0.60',
'numpy>=1.19',
'orjson>=3.6.7',
'orjson>=3.6.8',
'pandas>=1.3.5',
'psycopg2-binary==2.9.3',
'pysmb>=1.2.7',
Expand All @@ -39,11 +39,11 @@
],
include_package_data=True,
tests_require=[
'flask>=2.1.1',
'flask>=2.1.2',
'flask-cors>=3.0.10',
'moto>=3.0.3',
'pre-commit>=2.15.0',
'pylint>=2.13.4',
'pylint>=2.13.8',
'pytest>=7.0.1',
'pytest-asyncio>=0.15.1',
'pytest-cov>=3.0.0'
Expand Down

0 comments on commit 6b7ff51

Please sign in to comment.