Skip to content

Commit

Permalink
use entry point to install executable script
Browse files Browse the repository at this point in the history
  • Loading branch information
suvit committed Jan 7, 2013
1 parent 3bef388 commit 49727df
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
47 changes: 46 additions & 1 deletion README.md
@@ -1,2 +1,47 @@
python-dikbm-adapter
====================
=========================


Installation
----------------

installation is simple

pip install python-dikbm-adapter

or

pip install git+https://github.com/suvit/python-dikbm-adapter

Settings
-----------------------

Please, create settings.ini file in the same dir as dikbm_main script installed

Sample of ini file

[DiKBM]
username = my_secret_username
password = my_secret_password

other settings and theire default values

[DiKBM]

incomingDir = incoming
outgoingDir = outgoing
statusDir = status
errorDir = error
tempStatus = tempStatus
logDir = log

kbmToServiceUrl = http://172.19.3.9/dkbm-ws-1.0/services/kbmToServiceNoMtom?wsdl
PolicyLossServiceUrl = http://172.19.3.9/dkbm-ws-1.0/services/policyLossService?wsdl
historyServiceUrl = http://172.19.3.9/dkbm-ws-1.0/services/historyService?wsdl

this this ini file may be placed logging settings

to run use ``virtualenv/bin/dikbm_main`` or ``virtualenv/bin/dikbm_main.exe``



7 changes: 6 additions & 1 deletion dikbm_adapter/main.py
Expand Up @@ -8,7 +8,9 @@

logger = logging.getLogger(__name__)

if __name__ == '__main__':

def main():

logger.info('Starting DiKBM python client')
try:
client = DiKBMClient()
Expand All @@ -34,3 +36,6 @@
logger.info('lock %s released' % lock)
finally:
logger.info('Finished DiKMM python client')

if __name__ == '__main__':
main()
5 changes: 5 additions & 0 deletions setup.py
Expand Up @@ -30,4 +30,9 @@
'suds-passworddigest',
'lockfile'],
include_package_data=True,
entry_points={
'console_scripts': [
'dikbm_main = dikbm_adapter.main:main',
]
}
)

0 comments on commit 49727df

Please sign in to comment.