Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
carmithersh committed May 21, 2024
1 parent ddbb142 commit 328db83
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine:3.18.6

RUN mkdir pythonExample

WORKDIR /pythonExample

COPY requirements.txt .
COPY pythonExample/* pythonExample/

CMD ["pythonExample/pythonProj.py"]
2 changes: 2 additions & 0 deletions config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pi_key = "2VTHzn1mKZ/n9apD5P6nxsajSQh8QhmyyKvUIRoZWAHCB8lSbBm3YWx5nOdZ1zPEOaA0zIZy1eFgHgfB2HkfAdVrbQj19kagXDVe"
password=123passwrd123
1 change: 1 addition & 0 deletions pythonExample/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

19 changes: 19 additions & 0 deletions pythonExample/pythonProj.py
Original file line number Diff line number Diff line change
@@ -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");
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PyYAML>3.11
nltk
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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'],
)

0 comments on commit 328db83

Please sign in to comment.