diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..db35b69 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM alpine:3.18.6 + +RUN mkdir pythonExample + +WORKDIR /pythonExample + +COPY requirements.txt . +COPY pythonExample/* pythonExample/ + +CMD ["pythonExample/pythonProj.py"] diff --git a/config.properties b/config.properties new file mode 100644 index 0000000..aaff7f5 --- /dev/null +++ b/config.properties @@ -0,0 +1,2 @@ +pi_key = "2VTHzn1mKZ/n9apD5P6nxsajSQh8QhmyyKvUIRoZWAHCB8lSbBm3YWx5nOdZ1zPEOaA0zIZy1eFgHgfB2HkfAdVrbQj19kagXDVe" +password=123passwrd123 diff --git a/pythonExample/__init__.py b/pythonExample/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/pythonExample/__init__.py @@ -0,0 +1 @@ + diff --git a/pythonExample/pythonProj.py b/pythonExample/pythonProj.py new file mode 100644 index 0000000..30c16e6 --- /dev/null +++ b/pythonExample/pythonProj.py @@ -0,0 +1,19 @@ +#!/usr/bin/python + +# Function definition is here +def printme( str ): + # This prints a passed string into this function + print (str) + return; + +from project import db, app +from Cryptodome.Cipher import ARC4 +import hashlib + +def arc4_encrypt_password(key, password): + cipher = ARC4.new(key.encode('utf-8')) + encrypted_password = cipher.encrypt(password.encode('utf-8')) + return hashlib.md5(encrypted_password).hexdigest() + +# Now you can call printme function +printme("Hello from JFROG"); diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f293caf --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +PyYAML>3.11 +nltk diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..366b5ea --- /dev/null +++ b/setup.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +from setuptools import setup + +setup( + name='jfrog-python-example', + version='1.0', + description='Project example for building Python project with JFrog products', + author='JFrog', + author_email='jfrog@jfrog.com', + url='https://github.com/carmithersh/carmit-testing', + packages=['pythonExample'], + install_requires=['PyYAML>3.11', 'nltk'], +)