# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['spinta',
 'spinta.accesslog',
 'spinta.backends',
 'spinta.backends.fs',
 'spinta.backends.fs.commands',
 'spinta.backends.memory',
 'spinta.backends.memory.commands',
 'spinta.backends.mongo',
 'spinta.backends.mongo.commands',
 'spinta.backends.mongo.types',
 'spinta.backends.mongo.types.array',
 'spinta.backends.mongo.types.file',
 'spinta.backends.mongo.types.object',
 'spinta.backends.postgresql',
 'spinta.backends.postgresql.commands',
 'spinta.backends.postgresql.helpers',
 'spinta.backends.postgresql.types',
 'spinta.backends.postgresql.types.array',
 'spinta.backends.postgresql.types.file',
 'spinta.backends.postgresql.types.geometry',
 'spinta.backends.postgresql.types.object',
 'spinta.backends.postgresql.types.ref',
 'spinta.backends.types',
 'spinta.cli',
 'spinta.cli.helpers',
 'spinta.commands',
 'spinta.core',
 'spinta.datasets',
 'spinta.datasets.backends',
 'spinta.datasets.backends.csv',
 'spinta.datasets.backends.frictionless',
 'spinta.datasets.backends.frictionless.commands',
 'spinta.datasets.backends.notimpl',
 'spinta.datasets.backends.notimpl.commands',
 'spinta.datasets.backends.sql',
 'spinta.datasets.backends.sql.commands',
 'spinta.datasets.backends.sql.ufuncs',
 'spinta.datasets.backends.sqldump',
 'spinta.datasets.backends.sqldump.commands',
 'spinta.datasets.backends.sqldump.ufuncs',
 'spinta.datasets.commands',
 'spinta.datasets.keymaps',
 'spinta.dimensions',
 'spinta.dimensions.enum',
 'spinta.dimensions.lang',
 'spinta.dimensions.param',
 'spinta.dimensions.prefix',
 'spinta.dimensions.prefix.commands',
 'spinta.formats',
 'spinta.formats.ascii',
 'spinta.formats.csv',
 'spinta.formats.html',
 'spinta.formats.json',
 'spinta.formats.jsonlines',
 'spinta.hacks',
 'spinta.manifests',
 'spinta.manifests.backend',
 'spinta.manifests.backend.commands',
 'spinta.manifests.commands',
 'spinta.manifests.internal',
 'spinta.manifests.internal.commands',
 'spinta.manifests.tabular',
 'spinta.manifests.tabular.commands',
 'spinta.manifests.tabular.formats',
 'spinta.manifests.yaml',
 'spinta.manifests.yaml.commands',
 'spinta.migrations',
 'spinta.migrations.schema',
 'spinta.naming',
 'spinta.testing',
 'spinta.types',
 'spinta.types.array',
 'spinta.types.file',
 'spinta.types.geometry',
 'spinta.types.object',
 'spinta.types.ref',
 'spinta.ufuncs',
 'spinta.ufuncs.changebase',
 'spinta.units',
 'spinta.utils']

package_data = \
{'': ['*'], 'spinta': ['manifest/*', 'manifest/_schema/*', 'templates/*']}

install_requires = \
['GeoAlchemy2>=0.9.4,<0.10.0',
 'Shapely>=1.8.0,<2.0.0',
 'XlsxWriter>=1.3.7,<2.0.0',
 'aiofiles',
 'alembic',
 'asyncpg>=0.22.0,<0.23.0',
 'authlib>=0.11,<0.12',
 'click',
 'frictionless[sql]>=3.48.0,<4.0.0',
 'gunicorn',
 'jinja2',
 'jsonpatch',
 'lark-parser',
 'lxml',
 'msgpack',
 'multipledispatch',
 'openpyxl>=3.0.7,<4.0.0',
 'phonenumbers',
 'pprintpp',
 'psycopg2-binary',
 'pymongo',
 'python-multipart',
 'pytz',
 'requests',
 'ruamel.yaml',
 'setuptools-scm',
 'setuptools>=57,<58',
 'sqlalchemy>=1.4,<1.4.23',
 'sqlparse',
 'starlette',
 'texttable',
 'toposort',
 'tqdm',
 'typer[all]>=0.3.2,<0.4.0',
 'ujson',
 'unidecode',
 'uvicorn',
 'xlrd']

entry_points = \
{'console_scripts': ['spinta = spinta.cli.main:app']}

setup_kwargs = {
    'name': 'spinta',
    'version': '0.1.25',
    'description': 'A platform for describing, extracting, transforming, loading and serving open data.',
    'long_description': '.. default-role:: literal\n\nSpinta is a framework to describe, extract and publish data (DEP Framework). It\nsupports a great deal of data schemes and formats.\n\n.. image:: https://gitlab.com/atviriduomenys/spinta/badges/master/pipeline.svg\n   :target: https://gitlab.com/atviriduomenys/spinta/commits/master\n\n.. image:: https://gitlab.com/atviriduomenys/spinta/badges/master/coverage.svg\n   :target: https://gitlab.com/atviriduomenys/spinta/commits/master\n\n\nPurpose\n=======\n\n- **Describe your data**: You can automatically generate data structure\n  description table (*Manifest*) from many different data sources.\n\n- **Extract your data**: Once you have your data structure in *Manifest* tables,\n  you can extract data from multiple external data sources. Extracted data are\n  validated and transformed using rules defined in *Manifest* table. Finally,\n  data can be stored into internal database in order to provide fast and\n  flexible access to data.\n\n- **Publish your data**: Once you have your data loaded into internal\n  database, you can publish data using API. API is generated automatically using\n  *Manifest* tables and provides extracted data in many different formats. For\n  example if original data source was a CSV file, now you have a flexible API,\n  that can talk JSON, RDF, SQL, CSV and other formats.\n\n\nFeatures\n========\n\n- Simple 15 column table format for describing data structures (you can use\n  any spreadsheet software to manage metadata of your data)\n\n- Internal data storage with pluggable backends (PostgreSQL or Mongo)\n\n- Build-in async API server built on top of Starlette_ for data publishing\n\n- Simple web based data browser.\n\n- Convenient command-line interface\n\n- Public or restricted API access via OAuth protocol using build-in access\n  management.\n\n- Simple DSL_ for querying, transforming and validating data.\n\n- Low memory consumption for data of any size\n\n- Support for many different data sources\n\n- Advanced data extraction even from dynamic API.\n\n- Compatible with DCAT_ and `Frictionless Data Specifications`_.\n\n.. _Starlette: https://www.starlette.io/\n.. _DSL: https://en.wikipedia.org/wiki/Domain-specific_language\n.. _DCAT: https://www.w3.org/TR/vocab-dcat-2/\n.. _Frictionless Data Specifications: https://specs.frictionlessdata.io/\n\n\n.. note::\n\n    Currently this project is under heavy development and is in pre-alpha stage.\n    So many things might not work and many things can change. Use it at your own\n    risk.\n\n\nExample\n=======\n\nIf you have an SQLite database:\n\n.. code-block:: sh\n\n    $ sqlite3 sqlite.db <<EOF\n    CREATE TABLE COUNTRY (\n        NAME TEXT\n    );\n    EOF\n\nYou can get a limited API and simple web based data browser with a single\ncommand:\n\n.. code-block:: sh\n\n    $ spinta run -r sql sqlite:///sqlite.db\n\nThen you can generate metadata table (I call it *manifest*) like this:\n\n.. code-block:: sh\n\n    $ spinta inspect -r sql sqlite:///sqlite.db\n    d | r | b | m | property | type   | ref | source              | prepare | level | access | uri | title | description\n    dataset                  |        |     |                     |         |       |        |     |       |\n      | sql                  | sql    |     | sqlite:///sqlite.db |         |       |        |     |       |\n                             |        |     |                     |         |       |        |     |       |\n      |   |   | Country      |        |     | COUNTRY             |         |       |        |     |       |\n      |   |   |   | name     | string |     | NAME                |         | 3     | open   |     |       |\n\nGenerated data structure table can be saved into a CSV file:\n\n.. code-block:: sh\n\n    $ spinta inspect -r sql sqlite:///sqlite.db -o manifest.csv\n\nMissing peaces in metadata can be filled using any Spreadsheet software.\n\nOnce you done editing metadata, you can test it via web based data browser or\nAPI:\n\n.. code-block:: sh\n\n    $ spinta run --mode external manifest.csv\n\nOnce you are satisfied with metadata, you can generate a new metadata table for\npublishing, removing all traces of original data source:\n\n.. code-block:: sh\n\n    $ spinta copy --no-source --access open manifest.csv manifest-public.csv\n\nNow you have matadata for publishing, but all things about original data\nsource are gone. In order to publish data, you need to copy external data to\ninternal data store. To do that, first you need to initialize internal data\nstore:\n\n.. code-block:: sh\n\n    $ spinta config add backend my_backend postgresql postgresql://localhost/db\n    $ spinta config add manifest my_manifest tabular manifest-public.csv\n    $ spinta migrate\n\nOnce internal database is initialized, you can push external data into it:\n\n.. code-block:: sh\n\n    $ spinta push --access open manifest.csv\n\nAnd now you can publish data via full featured API with a web based data\nbrowser:\n\n.. code-block:: json\n\n    $ spinta run\n\nYou can access your data like this:\n\n.. code-block:: json\n\n    $ http :8000/dataset/sql/Country\n    HTTP/1.1 200 OK\n    content-type: application/json\n\n    {\n        "_data": [\n            {\n                "_type": "dataset/sql/Country",\n                "_id": "abdd1245-bbf9-4085-9366-f11c0f737c1d",\n                "_rev": "16dabe62-61e9-4549-a6bd-07cecfbc3508",\n                "_txn": "792a5029-63c9-4c07-995c-cbc063aaac2c",\n                "name": "Vilnius"\n            }\n        ]\n    }\n\n    $ http :8000/dataset/sql/Country/abdd1245-bbf9-4085-9366-f11c0f737c1d\n    HTTP/1.1 200 OK\n    content-type: application/json\n\n    {\n        "_type": "dataset/sql/Country",\n        "_id": "abdd1245-bbf9-4085-9366-f11c0f737c1d",\n        "_rev": "16dabe62-61e9-4549-a6bd-07cecfbc3508",\n        "_txn": "792a5029-63c9-4c07-995c-cbc063aaac2c",\n        "name": "Vilnius"\n    }\n\n    $ http :8000/dataset/sql/Country/abdd1245-bbf9-4085-9366-f11c0f737c1d?select(name)\n    HTTP/1.1 200 OK\n    content-type: application/json\n\n    {\n        "name": "Vilnius"\n    }\n',
    'author': 'Mantas Zimnickas',
    'author_email': 'sirexas@gmail.com',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://gitlab.com/atviriduomenys/spinta',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.8,<4.0',
}


setup(**setup_kwargs)
