mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Uses https://pluggy.readthedocs.io/ originally created for the py.test project We're starting with two plugin hooks: prepare_connection(conn) This is called when a new SQLite connection is created. It can be used to register custom SQL functions. prepare_jinja2_environment(env) This is called with the Jinja2 environment. It can be used to register custom template tags and filters. An example plugin which uses these two hooks can be found at https://github.com/simonw/datasette-plugin-demos or installed using `pip install datasette-plugin-demos` Refs #14
53 lines
1.5 KiB
Python
53 lines
1.5 KiB
Python
from setuptools import setup, find_packages
|
|
from datasette.version import __version__
|
|
import os
|
|
|
|
|
|
def get_long_description():
|
|
with open(os.path.join(
|
|
os.path.dirname(os.path.abspath(__file__)), 'README.md'
|
|
), encoding='utf8') as fp:
|
|
return fp.read()
|
|
|
|
|
|
setup(
|
|
name='datasette',
|
|
description='An instant JSON API for your SQLite databases',
|
|
long_description=get_long_description(),
|
|
long_description_content_type='text/markdown',
|
|
author='Simon Willison',
|
|
version=__version__,
|
|
license='Apache License, Version 2.0',
|
|
url='https://github.com/simonw/datasette',
|
|
packages=find_packages(),
|
|
package_data={'datasette': ['templates/*.html']},
|
|
include_package_data=True,
|
|
install_requires=[
|
|
'click==6.7',
|
|
'click-default-group==1.2',
|
|
'Sanic==0.7.0',
|
|
'Jinja2==2.10',
|
|
'hupper==1.0',
|
|
'pint==0.8.1',
|
|
'pluggy>=0.1.0,<1.0',
|
|
],
|
|
entry_points='''
|
|
[console_scripts]
|
|
datasette=datasette.cli:cli
|
|
''',
|
|
setup_requires=['pytest-runner'],
|
|
tests_require=[
|
|
'pytest==3.2.1',
|
|
'aiohttp==2.3.2',
|
|
'beautifulsoup4==4.6.0',
|
|
],
|
|
classifiers=[
|
|
'Development Status :: 3 - Alpha',
|
|
'Intended Audience :: Developers',
|
|
'Intended Audience :: Science/Research',
|
|
'Intended Audience :: End Users/Desktop',
|
|
'Topic :: Database',
|
|
'License :: OSI Approved :: Apache Software License',
|
|
'Programming Language :: Python :: 3.6',
|
|
],
|
|
)
|