How to use the catt.__version__ function in catt

To help you get started, we’ve selected a few catt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github skorokithakis / catt / catt / controllers.py View on Github external
def __init__(self):
        vhash = hashlib.sha1(__version__.encode()).hexdigest()[:8]
        cache_path = Path(tempfile.gettempdir(), "catt_{}_cache".format(vhash), "chromecast_hosts")
        super(Cache, self).__init__(cache_path)
        self._create_store_dir()

        if not self.store_path.is_file():
            devices = get_chromecasts()
            cache_data = {
                d.name: CCInfo(d.host, d.port, d.device.manufacturer, d.model_name, d.cast_type).all_info
                for d in devices
            }
            self._write_store(cache_data)
github skorokithakis / catt / setup.py View on Github external
readme = readme_file.read()

requirements = [
    "youtube-dl>=2019.01.24",
    "PyChromecast>=2.4.0",
    "Click>=5.0",
    "ifaddr>=0.1.4",
    "requests>=2.18.4",
    'typing;python_version<"3.5"',
]

test_requirements = []  # type: ignore

setup(
    name="catt",
    version=__version__,
    description="Cast All The Things allows you to send videos from many, many online sources to your Chromecast.",
    long_description=readme,
    author="Stavros Korokithakis",
    author_email="hi@stavros.io",
    url="https://github.com/skorokithakis/catt",
    packages=["catt"],
    package_dir={"catt": "catt"},
    include_package_data=True,
    install_requires=requirements,
    license="BSD",
    zip_safe=False,
    keywords="chromecast cast catt cast_all_the_things",
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: End Users/Desktop",
        "License :: OSI Approved :: BSD License",
github skorokithakis / catt / catt / cli.py View on Github external
@click.version_option(version=__version__, prog_name="catt", message="%(prog)s v%(version)s, Xylophone Xtravaganza.")
@click.pass_context
def cli(ctx, delete_cache, device):
    if delete_cache:
        Cache().clear()
    ctx.obj["device"] = device