Skip to content

Commit

Permalink
Merge pull request #8 from adilansari/pypi-setup
Browse files Browse the repository at this point in the history
Pypi setup
  • Loading branch information
adilansari committed May 3, 2015
2 parents 39afe7b + 6376f6f commit da5a044
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 81 deletions.
21 changes: 21 additions & 0 deletions LICENSE.mkd
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) [2015] [Adil Ansari]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
69 changes: 0 additions & 69 deletions README.mkd

This file was deleted.

69 changes: 69 additions & 0 deletions README.rst
@@ -0,0 +1,69 @@
|Build Status| |Code Climate| |Coverage Status| |License| |Downloads|

Scribe logger
================

This package contains a low level interface for writing to Scribe, as
well as a higher level log handler which plays nicely with Python's
logging facilities.

Supports Python 2.7

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

``pip install scribe-logger``

Testing locally
--------------------

::

git clone https://github.com/adilansari/python-scribe-logger.git
cd python-scribe-logger
pip install -U -r requirements.txt
python runtests.py

Logger usage
-----------------

.. code:: python
from scribe_logger.logger import ScribeLogHandler
import logging
my_logger = logging.getLogger('MyLogger')
my_logger.setLevel(logging.DEBUG)
scribe = ScribeLogHandler('localhost', 1464, category='test_category')
scribe.setLevel(logging.DEBUG)
my_logger.addHandler(scribe)
my_logger.info('This is a test message')
Writer usage
-----------------

.. code:: python
from scribe_logger.writer import ScribeWriter
writer = ScribeWriter('localhost', 1464, 'category')
writer.write('my message')
Contributors
-----------------

@adilansari @mwhooker @lenn0x

.. |Build Status| image:: https://travis-ci.org/adilansari/python-scribe-logger.svg?branch=master
:target: https://travis-ci.org/adilansari/python-scribe-logger
.. |Code Climate| image:: https://codeclimate.com/github/adilansari/python-scribe-logger/badges/gpa.svg
:target: https://codeclimate.com/github/adilansari/python-scribe-logger
.. |Coverage Status| image:: https://coveralls.io/repos/adilansari/python-scribe-logger/badge.svg?branch=master
:target: https://coveralls.io/r/adilansari/python-scribe-logger?branch=master
.. |Supported Python versions| image:: https://pypip.in/py_versions/scribe_logger/badge.svg
:target: https://pypi.python.org/pypi/scribe_logger/
.. |License| image:: https://img.shields.io/github/license/adilansari/python-scribe-logger.svg
:target: https://github.com/adilansari/python-scribe-logger/blob/master/LICENSE.mkd
.. |Downloads| image:: https://img.shields.io/pypi/dm/scribe_logger.svg
:target: https://pypi.python.org/pypi/scribe_logger/
40 changes: 28 additions & 12 deletions setup.py
@@ -1,24 +1,40 @@
from distutils.core import setup
from setuptools import setup
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()


setup(
name='scribe_logger',
version='1.0',
version='1.1',
description='Scribe log writer and logging handler.',
author='Chris Goffinet',
author_email='cg@chrisgoffinet.com',
maintainer='Matthew Hooker',
maintainer_email='mwhooker@gmail.com',
url='https://github.com/mwhooker/python-scribe-logger',
long_description=long_description,
license='MIT',
author='Chris Goffinet, Matthew Hooker, Adil Ansari',
author_email='me@adilansari.com',
maintainer='Adil Ansari',
maintainer_email='me@adilansari.com',
url='https://github.com/adilansari/python-scribe-logger',
packages=['scribe_logger'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries',
'Topic :: System :: Logging',
'License :: OSI Approved :: MIT License',
],
keywords='scribe logging',
install_requires=[
'facebook-scribe==2.0',
'thrift==0.9.2'
],
keywords=[
'scribe',
'logging'
]
extras_require={
'test': ['nose==1.3.6', 'mock==1.0.1', 'coverage==3.7.1']
}
)

0 comments on commit da5a044

Please sign in to comment.