Metadata-Version: 2.1
Name: freshpointsync
Version: 0.1.0
Summary: Freshpoint.cz web page data parser and syncer.
Author-email: Konstantin Mykhailov <constantinemykhailov@gmail.com>
License: MIT License
        
        Copyright (c) 2023 Konstantin
        
        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.
        
Project-URL: Homepage, https://github.com/mykhakos/FreshPointSync
Keywords: freshpoint,freshpoint.cz
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: aiohttp
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Other Audience
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Natural Language :: Czech
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: aiohttp
Requires-Dist: certifi
Requires-Dist: beautifulsoup4
Requires-Dist: lxml
Requires-Dist: pydantic
Requires-Dist: unidecode
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx_copybutton; extra == "docs"
Requires-Dist: autodoc-pydantic; extra == "docs"
Requires-Dist: sphinx_rtd_theme; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"

==============================================================
FreshPointSync: FreshPoint.cz web page data parser and syncer.
==============================================================

FreshPointSync delivers an efficient asynchronous interface designed for
extracting and tracking data from `FreshPoint <https://my.freshpoint.cz/>`__
product webpages.

| `📁 Source files <https://github.com/mykhakos/FreshPointSync>`__
| `⚠️ Issue tracker <https://github.com/mykhakos/FreshPointSync/issues>`__
| `📦 PyPI <https://pypi.org/project/freshpointsync/>`__
| `📜 Documentation <https://freshpointsync.readthedocs.io/en/latest/>`__


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

FreshPointSync supports Python 3.8 and higher. The library can be installed
using the following CLI command:

.. code-block:: console

   $ pip install freshpointsync


Minimal Example
---------------

The following example demonstrates how to fetch a FreshPoint webpage data
and analyze its contents:

.. code-block:: python

    import asyncio
    from freshpointsync import ProductPage

    async def main() -> None:
        async with ProductPage(location_id=296) as page:
            await page.update()
            products = page.find_products()
            print(
                f'Location name: {page.data.location}\n'
                f'Product count: {len(products)} '
                f'({len([p for p in products if p.is_available])} in stock)'
            )

    if __name__ == '__main__':
        asyncio.run(main())
