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

packages = \
['iscc_core']

package_data = \
{'': ['*']}

install_requires = \
['bitarray-hardbyte',
 'blake3',
 'loguru>=0.5.3,<0.6.0',
 'more-itertools',
 'pydantic[dotenv]>=1.8.2,<2.0.0',
 'uvarint>=1.2.0,<2.0.0',
 'xxhash']

extras_require = \
{'turbo': ['cython', 'pybase64']}

setup_kwargs = {
    'name': 'iscc-core',
    'version': '0.1.8',
    'description': 'ISCC - Core Algorithms',
    'long_description': '# iscc-core - ISCC Core Algorithms\n\n[![Build](https://github.com/iscc/iscc-core/actions/workflows/tests.yml/badge.svg)](https://github.com/iscc/iscc-core/actions/workflows/tests.yml)\n[![Version](https://img.shields.io/pypi/v/iscc-core.svg)](https://pypi.python.org/pypi/iscc-core/)\n[![Downloads](https://pepy.tech/badge/iscc-core)](https://pepy.tech/project/iscc-core)\n\n> `iscc-core` is a Python library that implements the core algorithms of the [ISCC](https://iscc.codes)\n(International Standard Content Code)\n\n| NOTE: This is a low level reference implementation. `iscc-core` does not support content/metadata detection, extraction or preprocessing. For easy generation of ISCC codes see: [iscc-cli](https://github.com/iscc/iscc-cli) |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n## What is ISCC\n\nThe **ISCC** (*International Standard Content Code*) is an identifier for digital media\nassets.\n\nAn **ISCC** is derived algorithmically from the digital content itself, just like\ncryptographic hashes. However, instead of using a single cryptographic hash function to\nidentify data only, the ISCC uses a variety of algorithms to create a composite\nidentifier that exhibits similarity-preserving properties (soft hash).\n\nThe component-based structure of the ISCC identifies content at multiple levels of\nabstraction. Each component is self-describing, modular and can be used separately or\nin conjunction with others to aid in various content identification tasks.\n\nThe algorithmic design supports scenarios that require content deduplication, database\nsynchronisation and indexing, integrity verification, timestamping, versioning, data\nprovenance, similarity clustering, anomaly detection, usage tracking, allocation of\nroyalties, fact-checking and general digital asset management use-cases.\n\n## What is `iscc-core`\n\n`iscc-core` is the python based library of the core algorithms to create standard\ncompliant **ISCC** codes. It also serves as a reference for porting ISCC to other\nprogramming languages.\n\n## ISCC Architecture\n\n![ISCC Architecure](https://raw.githubusercontent.com/iscc/iscc-core/master/docs/images/iscc-architecture.png)\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install `iscc-core`.\n\n```bash\npip install iscc-core\n```\n\n## Quick Start\n\n```python\nimport iscc_core\n\n\nmeta_code = iscc_core.gen_meta_code(title="ISCC Test Document!")\n\nprint(f"Meta-Code:     ISCC:{meta_code.iscc}")\nprint(f"Structure:     {meta_code.code_obj.explain}\\n")\n\n# Extract text from file\nwith open(\'demo.txt\', "rt", encoding=\'utf-8\') as stream:\n    text = stream.read()\n    text_code = iscc_core.gen_text_code_v0(text)\n    print(f"Text-Code:     ISCC:{text_code.iscc}")\n    print(f"Structure:     {text_code.code_obj.explain}\\n")\n\n# Process raw bytes of textfile\nwith open(\'demo.txt\', "rb") as stream:\n    data_code = iscc_core.gen_data_code(stream)\n    print(f"Data-Code:     ISCC:{data_code.iscc}")\n    print(f"Structure:     {data_code.code_obj.explain}\\n")\n\n    stream.seek(0)\n    instance_code = iscc_core.gen_instance_code(stream)\n    print(f"Instance-Code: ISCC:{instance_code.iscc}")\n    print(f"Structure:     {instance_code.code_obj.explain}\\n")\n\niscc_code = iscc_core.gen_iscc_code(\n    (meta_code.iscc, text_code.iscc, data_code.iscc, instance_code.iscc)\n)\nprint(f"ISCC-CODE:     ISCC:{iscc_code.iscc}")\nprint(f"Structure:     {iscc_code.code_obj.explain}\\n")\n\niscc_id = iscc_core.gen_iscc_id(chain=1, iscc_code=iscc_code.iscc, uc=7)\nprint(f"ISCC-ID:       ISCC:{iscc_id.iscc}")\nprint(f"Structure:     ISCC:{iscc_id.code_obj.explain}")\n\n```\n\nThe output of this example is as follows:\n\n```\nMeta-Code:     ISCC:AAA3MGR7CSJ3O3D3\nStructure:     META-NONE-V0-64-b61a3f1493b76c7b\n\nText-Code:     ISCC:EAASS2POFOWX6KDJ\nStructure:     CONTENT-TEXT-V0-64-2969ee2bad7f2869\n\nData-Code:     ISCC:GAAZ5SQ47ZQ34A3V\nStructure:     DATA-NONE-V0-64-9eca1cfe61be0375\n\nInstance-Code: ISCC:IAASQF7FY2TLVFRC\nStructure:     INSTANCE-NONE-V0-64-2817e5c6a6ba9622\n\nISCC-CODE:     ISCC:KAD3MGR7CSJ3O3D3FFU64K5NP4UGTHWKDT7GDPQDOUUBPZOGU25JMIQ\nStructure:     ISCC-TEXT-V0-256-b61a3f1493b76c7b2969ee2bad7f28699eca1cfe61be03752817e5c6a6ba9622\n\nISCC-ID:       ISCC:MEASBPSKHY7KDPZIA4\nStructure:     ISCC:ID-BITCOIN-V0-72-20be4a3e3ea1bf28-7\n```\n\n## Documentation\n\nhttps://iscc-core.iscc.codes\n\n## Project Status\n\nISCC is in the process of being standardized within\n[ISO/TC 46/SC 9](https://www.iso.org/standard/77899.html).\n\n## Maintainers\n[@titusz](https://github.com/titusz)\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss\nwhat you would like to change. Please make sure to update tests as appropriate.\n\nYou may also want join our developer chat on Telegram at <https://t.me/iscc_dev>.\n\n## Changelog\n\n### [0.1.8] - 2021-12-12\n- Added conformance tests for all top level functions\n- Added conformance tests to source dir\n- Added conformance module with `selftest` function\n- Changed gen_image_code to accept normalized pixels instead of stream\n- Changed opts to core_opts\n- Removed image pre-processing and Pillow dependency\n- Fixed readability of conformance tests\n- Fixed soft_hash_video_v0 to accept non-tuple sequences\n- Updated example code\n\n### [0.1.7] - 2021-12-09\n\n- Add dotenv for enviroment based configuration\n- Cleanup package toplevel imports\n- Return schema objects for iscc_code and iscc_id\n- Exclude unset and none values from result dicts\n- Add support for multiple code combinations for ISCC-CODE\n- Add support for ISCC-ID based on singular Instance-Code\n- Add initial conformance test system\n\n### [0.1.6] - 2021-11-29\n- Show counter for ISCC-ID in Code.explain\n\n### [0.1.5] - 2021-11-28\n\n- Fix documentation\n- Change metahash creation logic\n- Refactor models\n- Add Content-Code-Mixed\n- Add ISCC-ID\n- Refactor `compose` to `gen_iscc_code`\n- Refactor `models` to `schema`\n\n### [0.1.4] - 2021-11-17\n- Simplified options\n- Optimize video WTA-hash for use with 64-bit granular features\n\n### [0.1.3] - 2021-11-15\n- Try to compile Cython/C accelerator modules when installing via pip\n- Simplify soft_hash api return values\n- Add .code() method to InstanceHasher, DataHasher\n- Remove granular fingerprint calculation\n- Add more top-level imports\n\n### [0.1.2] - 2021-11-14\n- Export more functions to toplevel\n- Return schema driven objects from ISCC code generators.\n\n### [0.1.1] - 2021-11-14\n- Fix packaging problems\n\n### [0.1.0] - 2021-11-13\n- Initial release\n\n\n',
    'author': 'Titusz',
    'author_email': 'tp@py7.de',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/iscc/iscc-core',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'extras_require': extras_require,
    'python_requires': '>=3.6.1,<4.0',
}
from build import *
build(setup_kwargs)

setup(**setup_kwargs)
