INNER CODE UNIT · Python

get_readme

yezyilomo/django-restql · setup.py:15

def get_readme():
    readme = ""
    with open("README.md", "r", "utf-8") as f:
        readme = f.read()
    return readme


def get_info(info_name):
    init_py = open(os.path.join("django_restql", "__init__.py")).read()
    return re.search("%s = ['\"]([^'\"]+)['\"]" % info_name, init_py).group(1)


url = get_info("__url__")
version = get_info("__version__")
license_ = get_info("__license__")
description = get_info("__description__")
author = get_info("__author__")
author_email = get_info("__author_email__")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…