{"id":13469232,"url":"https://github.com/joeyespo/grip","last_synced_at":"2025-05-13T16:06:14.489Z","repository":{"id":5530610,"uuid":"6732980","full_name":"joeyespo/grip","owner":"joeyespo","description":"Preview GitHub README.md files locally before committing them.","archived":false,"fork":false,"pushed_at":"2024-07-10T06:39:28.000Z","size":631,"stargazers_count":6633,"open_issues_count":121,"forks_count":431,"subscribers_count":72,"default_branch":"master","last_synced_at":"2025-04-21T04:43:21.105Z","etag":null,"topics":["commandline-interface","flask","github","html","python","readme"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeyespo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-11-17T07:27:16.000Z","updated_at":"2025-04-19T22:12:46.000Z","dependencies_parsed_at":"2023-01-13T13:35:12.346Z","dependency_job_id":"7c708beb-90cd-4ba7-8ac5-4da4bc182ae4","html_url":"https://github.com/joeyespo/grip","commit_stats":{"total_commits":513,"total_committers":39,"mean_commits":"13.153846153846153","dds":"0.15984405458089668","last_synced_commit":"a3f0ab5c8942ac15cf68f790b80c0a43b3a4c71e"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyespo%2Fgrip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyespo%2Fgrip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyespo%2Fgrip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyespo%2Fgrip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeyespo","download_url":"https://codeload.github.com/joeyespo/grip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250333910,"owners_count":21413475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commandline-interface","flask","github","html","python","readme"],"created_at":"2024-07-31T15:01:29.872Z","updated_at":"2025-04-23T20:41:17.113Z","avatar_url":"https://github.com/joeyespo.png","language":"Python","funding_links":[],"categories":["Utilities","Python","Github","Markdown","Содержание:","Uncategorized","Development","CLI Tools","HarmonyOS","github","Documentation","\u003ca name=\"markdown\"\u003e\u003c/a\u003eMarkdown"],"sub_categories":["Markdown","Snippets Manager","Markdown, редактура","Uncategorized","Games","Windows Manager","Observability"],"readme":"Grip -- GitHub Readme Instant Preview\n=====================================\n\n[![Current version on PyPI](http://img.shields.io/pypi/v/grip.svg)][pypi]\n[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/joeyespo)\n\nRender local readme files before sending off to GitHub.\n\nGrip is a command-line server application written in Python that uses the\n[GitHub markdown API][markdown] to render a local readme file. The styles\nand rendering come directly from GitHub, so you'll know exactly how it will appear.\nChanges you make to the Readme will be instantly reflected in the browser without\nrequiring a page refresh.\n\n\nMotivation\n----------\n\nSometimes you just want to see the exact readme\nresult before committing and pushing to GitHub.\n\nEspecially when doing [Readme-driven development][rdd].\n\n\nInstallation\n------------\n\nTo install grip, simply:\n\n```console\n$ pip install grip\n```\n\nOn OS X, you can also install with Homebrew:\n\n```console\n$ brew install grip\n```\n\n\nUsage\n-----\n\nTo render the readme of a repository:\n\n```console\n$ cd myrepo\n$ grip\n * Running on http://localhost:6419/\n```\n\nNow open a browser and visit [http://localhost:6419](http://localhost:6419/).\nOr run with `-b` and Grip will open a new browser tab for you.\n\nYou can also specify a port:\n\n```console\n$ grip 80\n * Running on http://localhost:80/\n```\n\nOr an explicit file:\n\n```console\n$ grip AUTHORS.md\n * Running on http://localhost:6419/\n```\n\nAlternatively, you could just run `grip` and visit [localhost:6419/AUTHORS.md][AUTHORS.md]\nsince grip supports relative URLs.\n\nYou can combine the previous examples. Or specify a hostname instead of a port. Or provide both.\n\n```console\n$ grip AUTHORS.md 80\n * Running on http://localhost:80/\n```\n\n```console\n$ grip CHANGES.md 0.0.0.0\n * Running on http://0.0.0.0:6419/\n```\n\n```console\n$ grip . 0.0.0.0:80\n * Running on http://0.0.0.0:80/\n```\n\nYou can even bypass the server and **export** to a single HTML file, with all the styles and assets inlined:\n\n```console\n$ grip --export\nExporting to README.html\n```\n\nControl the output name with the second argument:\n\n```console\n$ grip README.md --export index.html\nExporting to index.html\n```\n\nIf you're exporting a bunch of files, you can prevent styles from being inlining to save space with `--no-inline`:\n\n```console\n$ grip README.md --export --no-inline introduction.html\nExporting to introduction.html\n```\n\nReading and writing from **stdin** and **stdout** is also supported, allowing you to use Grip with other programs:\n\n```console\n$ cat README.md | grip -\n * Running on http://localhost:6419/\n```\n\n```console\n$ grip AUTHORS.md --export - | bcat\n```\n\n```console\n$ cat README.md | grip --export - | less\n```\n\nThis allows you to quickly test how things look by entering Markdown directly in your terminal:\n\n```console\n$ grip -\nHello **world**!\n^D\n * Running on http://localhost:6419/\n```\n\n*Note: `^D` means `Ctrl+D`, which works on Linux and OS X. On Windows you'll have to use `Ctrl+Z`.*\n\nRendering as user-content like **comments** and **issues** is also supported, with an optional repository context for linking to issues:\n\n```console\n$ grip --user-content --context=joeyespo/grip\n * Running on http://localhost:6419/\n```\n\nFor more details and additional options, see the help:\n\n```console\n$ grip -h\n```\n\n\nAccess\n------\n\nGrip strives to be as close to GitHub as possible. To accomplish this, grip\nuses [GitHub's Markdown API][markdown] so that changes to their rendering\nengine are reflected immediately without requiring you to upgrade grip.\nHowever, because of this you may hit the API's hourly rate limit. If this\nhappens, grip offers a way to access the API using your credentials\nto unlock a much higher rate limit.\n\n```console\n$ grip --user \u003cyour-username\u003e --pass \u003cyour-password\u003e\n```\n\nOr use a [personal access token][] with an empty scope (note that a token is\n*required* if your GitHub account is set up with two-factor authentication):\n\n```console\n$ grip --pass \u003ctoken\u003e\n```\n\nYou can persist these options [in your local configuration](#configuration).\nFor security purposes, it's highly recommended that you **use an access token\nover a password**. (You could also keep your password safe by configuring\nGrip to [grab your password from a password manager][keychain-access].)\n\nThere's also a [work-in-progress branch][offline-renderer] to provide\n**offline rendering**. Once this resembles GitHub more precisely, it'll\nbe exposed in the CLI, and will ultimately be used as a seamless fallback\nengine for when the API can't be accessed.\n\nGrip always accesses GitHub over HTTPS,\nso your README and credentials are protected.\n\n\nTips\n----\n\nHere's how others from the community are using Grip.\n\nWant to share your own? [Say hello @joeyespo][twitter] or [submit a pull request](#contributing).\n\n\n#### Create a local mirror of a Github Wiki\n\n```console\n$ git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.wiki.git\n$ cd YOUR_REPOSITORY.wiki\n$ grip\n```\n\n*By [Joshua Gourneau](https://twitter.com/gourneau/status/636329126643658753).*\n\n\n#### Generate HTML documentation from a collection of linked README files\n\n1. Enter the directory:\n\n   ```console\n   $ cd YOUR_DIR\n   $ export GRIPURL=$(pwd)\n   ```\n\n2. Include all assets by setting the `CACHE_DIRECTORY` [config variable](#configuration):\n\n   ```console\n   $ echo \"CACHE_DIRECTORY = '$(pwd)/assets'\" \u003e\u003e ~/.grip/settings.py\n   ```\n\n3. Export all your Markdown files with Grip and replace absolute asset paths with relative paths:\n\n   ```console\n   $ for f in *.md; do grip --export $f --no-inline; done\n   $ for f in *.html; do sed -i '' \"s?$GRIPURL/??g\" $f; done\n   ```\n\nYou can optionally compress the set of HTML files to `docs.tgz` with:\n\n   ```console\n   $ tar -czvf docs.tgz `ls | grep [\\.]html$` assets\n   ```\n\nLooking for a cross platform solution? Here's an equivalent [Python script](https://gist.github.com/mrexmelle/659abc02ae1295d60647).\n\n*By [Matthew R. Tanudjaja](https://github.com/mrexmelle).*\n\n\nConfiguration\n-------------\n\nTo customize Grip, create `~/.grip/settings.py`, then add one or more of the following variables:\n\n- `HOST`: The host to use when not provided as a CLI argument, `localhost` by default\n- `PORT`: The port to use when not provided as a CLI argument, `6419` by default\n- `DEBUG`: Whether to use Flask's debugger when an error happens, `False` by default\n- `DEBUG_GRIP`: Prints extended information when an error happens, `False` by default\n- `API_URL`: Base URL for the github API, for example that of a Github Enterprise instance. `https://api.github.com` by default\n- `CACHE_DIRECTORY`: The directory, relative to `~/.grip`, to place cached assets (this gets run through the following filter: `CACHE_DIRECTORY.format(version=__version__)`), `'cache-{version}'` by default\n- `AUTOREFRESH`: Whether to automatically refresh the Readme content when the file changes, `True` by default\n- `QUIET`: Do not print extended information, `False` by default\n- `STYLE_URLS`: Additional URLs that will be added to the rendered page, `[]` by default\n- `USERNAME`: The username to use when not provided as a CLI argument, `None` by default\n- `PASSWORD`: The password or [personal access token][] to use when not provided as a CLI argument (*Please don't save your passwords here.* Instead, use an access token or drop in this code [grab your password from a password manager][keychain-access]), `None` by default\n\nNote that this is a Python file. If you see `'X' is not defined` errors, you\nmay have overlooked some quotes. For example:\n\n```py\nUSERNAME = 'your-username'\nPASSWORD = 'your-personal-access-token'\n```\n\n\n#### Environment variables\n\n- `GRIPHOME`: Specify an alternative `settings.py` location, `~/.grip` by default\n- `GRIPURL`: The URL of the Grip server, `/__/grip` by default\n\n#### Advanced\n\nThis file is a normal Python script, so you can add more advanced configuration.\n\nFor example, to read a setting from the environment and provide a default value\nwhen it's not set:\n\n```python\nPORT = os.environ.get('GRIP_PORT', 8080)\n```\n\n\nAPI\n---\n\nYou can access the API directly with Python, using it in your own projects:\n\n```python\nfrom grip import serve\n\nserve(port=8080)\n * Running on http://localhost:8080/\n```\n\nRun main directly:\n\n```python\nfrom grip import main\n\nmain(argv=['-b', '8080'])\n * Running on http://localhost:8080/\n```\n\nOr access the underlying Flask application for even more flexibility:\n\n```python\nfrom grip import create_app\n\ngrip_app = create_app(user_content=True)\n# Use in your own app\n```\n\n\n### Documentation\n\n#### serve\n\nRuns a local server and renders the Readme file located\nat `path` when visited in the browser.\n\n```python\nserve(path=None, host=None, port=None, user_content=False, context=None, username=None, password=None, render_offline=False, render_wide=False, render_inline=False, api_url=None, title=None, autorefresh=True, browser=False, grip_class=None)\n```\n\n- `path`: The filename to render, or the directory containing your Readme file, defaulting to the current working directory\n- `host`: The host to listen on, defaulting to the HOST configuration variable\n- `port`: The port to listen on, defaulting to the PORT configuration variable\n- `user_content`: Whether to render a document as [user-content][] like user comments or issues\n- `context`: The project context to use when `user_content` is true, which\n             takes the form of `username/project`\n- `username`: The user to authenticate with GitHub to extend the API limit\n- `password`: The password to authenticate with GitHub to extend the API limit\n- `render_offline`: Whether to render locally using [Python-Markdown][] (Note: this is a work in progress)\n- `render_wide`: Whether to render a wide page, `False` by default (this has no effect when used with `user_content`)\n- `render_inline`: Whether to inline the styles within the HTML file\n- `api_url`: A different base URL for the github API, for example that of a Github Enterprise instance. The default is the public API https://api.github.com.\n- `title`: The page title, derived from `path` by default\n- `autorefresh`: Automatically update the rendered content when the Readme file changes, `True` by default\n- `browser`: Open a tab in the browser after the server starts., `False` by default\n- `grip_class`: Use a custom [Grip class](#class-gripflask)\n\n\n#### export\n\nWrites the specified Readme file to an HTML file with styles and assets inlined.\n\n```python\nexport(path=None, user_content=False, context=None, username=None, password=None, render_offline=False, render_wide=False, render_inline=True, out_filename=None, api_url=None, title=None, quiet=None, theme='light', grip_class=None)\n```\n\n- `path`: The filename to render, or the directory containing your Readme file, defaulting to the current working directory\n- `user_content`: Whether to render a document as [user-content][] like user comments or issues\n- `context`: The project context to use when `user_content` is true, which\n             takes the form of `username/project`\n- `username`: The user to authenticate with GitHub to extend the API limit\n- `password`: The password to authenticate with GitHub to extend the API limit\n- `render_offline`: Whether to render locally using [Python-Markdown][] (Note: this is a work in progress)\n- `render_wide`: Whether to render a wide page, `False` by default (this has no effect when used with `user_content`)\n- `render_inline`: Whether to inline the styles within the HTML file (Note: unlike the other API functions, this defaults to `True`)\n- `out_filename`: The filename to write to, `\u003cin_filename\u003e.html` by default\n- `api_url`: A different base URL for the github API, for example that of a Github Enterprise instance. The default is the public API https://api.github.com.\n- `title`: The page title, derived from `path` by default\n- `quiet`: Do not print to the terminal\n- `theme`: Theme to view markdown file (light mode or dark mode). Valid options (\"light\", \"dark\"). Default: \"light\".\n- `grip_class`: Use a custom [Grip class](#class-gripflask)\n\n\n#### create_app\n\nCreates a Flask application you can use to render and serve the Readme files.\nThis is the same app used by `serve` and `export` and initializes the cache,\nusing the cached styles when available.\n\n```python\ncreate_app(path=None, user_content=False, context=None, username=None, password=None, render_offline=False, render_wide=False, render_inline=False, api_url=None, title=None, text=None, grip_class=None)\n```\n\n- `path`: The filename to render, or the directory containing your Readme file, defaulting to the current working directory\n- `user_content`: Whether to render a document as [user-content][] like user comments or issues\n- `context`: The project context to use when `user_content` is true, which\n             takes the form of `username/project`\n- `username`: The user to authenticate with GitHub to extend the API limit\n- `password`: The password to authenticate with GitHub to extend the API limit\n- `render_offline`: Whether to render locally using [Python-Markdown][] (Note: this is a work in progress)\n- `render_wide`: Whether to render a wide page, `False` by default (this has no effect when used with `user_content`)\n- `render_inline`: Whether to inline the styles within the HTML file\n- `api_url`: A different base URL for the github API, for example that of a Github Enterprise instance. The default is the public API https://api.github.com.\n- `title`: The page title, derived from `path` by default\n- `text`: A string or stream of Markdown text to render instead of being loaded from `path` (Note: `path` can be used to set the page title)\n- `grip_class`: Use a custom [Grip class](#class-gripflask)\n\n\n#### render_app\n\nRenders the application created by `create_app` and returns the HTML that would\nnormally appear when visiting that route.\n\n```python\nrender_app(app, route='/')\n```\n\n- `app`: The Flask application to render\n- `route`: The route to render, '/' by default\n\n\n#### render_content\n\nRenders the specified markdown text without caching.\n\n```python\nrender_content(text, user_content=False, context=None, username=None, password=None, render_offline=False, api_url=None, title=None)\n```\n\n- `text`: The Markdown text to render\n- `user_content`: Whether to render a document as [user-content][] like user comments or issues\n- `context`: The project context to use when `user_content` is true, which\n             takes the form of `username/project`\n- `username`: The user to authenticate with GitHub to extend the API limit\n- `password`: The password to authenticate with GitHub to extend the API limit\n- `render_offline`: Whether to render locally using [Python-Markdown][] (Note: this is a work in progress)\n- `api_url`: A different base URL for the github API, for example that of a Github Enterprise instance. This is required when not using the offline renderer.\n- `title`: The page title, derived from `path` by default\n\n\n#### render_page\n\nRenders the markdown from the specified path or text, without caching,\nand returns an HTML page that resembles the GitHub Readme view.\n\n```python\nrender_page(path=None, user_content=False, context=None, username=None, password=None, render_offline=False, render_wide=False, render_inline=False, api_url=None, title=None, text=None, quiet=None, theme='light', grip_class=None)\n```\n\n- `path`: The path to use for the page title, rendering `'README.md'` if None\n- `user_content`: Whether to render a document as [user-content][] like user comments or issues\n- `context`: The project context to use when `user_content` is true, which\n             takes the form of `username/project`\n- `username`: The user to authenticate with GitHub to extend the API limit\n- `password`: The password to authenticate with GitHub to extend the API limit\n- `render_offline`: Whether to render offline using [Python-Markdown][] (Note: this is a work in progress)\n- `render_wide`: Whether to render a wide page, `False` by default (this has no effect when used with `user_content`)\n- `render_inline`: Whether to inline the styles within the HTML file\n- `api_url`: A different base URL for the github API, for example that of a Github Enterprise instance. The default is the public API https://api.github.com.\n- `title`: The page title, derived from `path` by default\n- `text`: A string or stream of Markdown text to render instead of being loaded from `path` (Note: `path` can be used to set the page title)\n- `quiet`: Do not print to the terminal\n- `theme`: Theme to view markdown file (light mode or dark mode). Valid options (\"light\", \"dark\"). Default: \"light\".\n- `grip_class`: Use a custom [Grip class](#class-gripflask)\n\n\n#### clear_cache\n\nClears the cached styles and assets.\n\n```python\nclear_cache(grip_class=None)\n```\n\n#### main\n\nRuns Grip with the specified arguments.\n\n```python\nmain(argv=None, force_utf8=True)\n```\n\n- `argv`: The arguments to run with, `sys.argv[1:]` by default\n- `force_utf8`: Sets the default encoding to `utf-8` in the current Python instance. This has no effect on Python 3 since Unicode is handled by default\n\n\n### Classes\n\n#### class Grip(Flask)\n\nA Flask application that can serve a file or directory containing a README.\n\n```python\nGrip(source=None, auth=None, renderer=None, assets=None, render_wide=None, render_inline=None, title=None, autorefresh=None, quiet=None, theme='light', grip_url=None, static_url_path=None, instance_path=None, **kwargs)\n```\n\n##### default_renderer\n\nReturns the default renderer using the current config. This is only used if\nrenderer is set to None in the constructor.\n\n```python\nGrip.default_renderer()\n```\n\n##### default_asset_manager\n\nReturns the default asset manager using the current config. This is only used\nif asset_manager is set to None in the constructor.\n\n```python\nGrip.default_asset_manager()\n```\n\n##### add_content_types\n\nAdds the application/x-font-woff and application/octet-stream content types if\nthey are missing. Override to add additional content types on initialization.\n\n```python\nGrip.add_content_types()\n```\n\n##### clear_cache\n\nClears the downloaded assets.\n\n```python\nGrip.clear_cache()\n```\n\n##### render\n\nRenders the application and returns the HTML unicode that would normally appear\nwhen visiting in the browser.\n\n```python\nGrip.render(route=None)\n```\n\n- `route`: The route to render, `/` by default\n\n##### run\n\nStarts a server to render the README. This calls [Flask.run][] internally.\n\n```python\nGrip.run(host=None, port=None, debug=None, use_reloader=None, open_browser=False)\n```\n\n- `host`: The hostname to listen on. Set this to `'0.0.0.0'` to have the server\n          available externally as well, `'localhost'` by default\n- `port`: The port of the webserver. Defaults to `6419`\n- `debug`: If given, enable or disable debug mode. See [Flask.debug][].\n- `use_reloader`: Should the server automatically restart the python process\n                  if modules were changed? `False` by default unless the\n                  `DEBUG_GRIP` setting is specified.\n- `open_browser`: Opens the browser to the address when the server starts\n\n\n#### class AlreadyRunningError(RuntimeError)\n\nRaised when `Grip.run` is called while the server is already running.\n\n```python\nAlreadyRunningError()\n```\n\n\n#### class ReadmeNotFoundError(NotFoundError or IOError)\n\nRaised when the specified Readme could not be found.\n\n```python\nReadmeNotFoundError(path=None, message=None)\n```\n\n\n#### class ReadmeAssetManager(object)\n\nManages the style and font assets rendered with Readme pages. This is an\nabstract base class.\n\n```python\nReadmeAssetManager(cache_path, style_urls=None)\n```\n\n\n#### class GitHubAssetManager(ReadmeAssetManager)\n\nManages the style and font assets rendered with Readme pages. Set cache_path to\nNone to disable caching.\n\n\n#### class ReadmeReader(object)\n\nReads Readme content from a URL subpath. This is an abstract base class.\n\n```python\nReadmeReader()\n```\n\n\n#### class DirectoryReader(ReadmeReader)\n\nReads Readme files from URL subpaths.\n\n```python\nDirectoryReader(path=None, silent=False)\n```\n\n\n#### class TextReader(ReadmeReader)\n\nReads Readme content from the provided unicode string.\n\n```python\nTextReader(text, display_filename=None)\n```\n\n\n#### class StdinReader(TextReader)\n\nReads Readme text from STDIN.\n\n```python\nStdinReader(display_filename=None)\n```\n\n\n#### class ReadmeRenderer(object)\n\nRenders the Readme. This is an abstract base class.\n\n```python\nReadmeRenderer(user_content=None, context=None)\n```\n\n\n#### class GitHubRenderer(ReadmeRenderer)\n\nRenders the specified Readme using the GitHub Markdown API.\n\n```python\nGitHubRenderer(user_content=None, context=None, api_url=None, raw=None)\n```\n\n\n#### class OfflineRenderer(ReadmeRenderer)\n\nRenders the specified Readme locally using pure Python. Note: This is currently\nan incomplete feature.\n\n```python\nOfflineRenderer(user_content=None, context=None)\n```\n\n\n### Constants\n\n\n#### SUPPORTED_TITLES\n\nThe common Markdown file titles on GitHub.\n\n```python\nSUPPORTED_TITLES = ['README', 'Home']\n```\n\n- `filename`: The UTF-8 file to read.\n\n\n#### SUPPORTED_EXTENSIONS\n\nThe supported extensions, as defined by [GitHub][markdown].\n\n```python\nSUPPORTED_EXTENSIONS = ['.md', '.markdown']\n```\n\n\n#### DEFAULT_FILENAMES\n\nThis constant contains the names Grip looks for when no file is provided.\n\n```python\nDEFAULT_FILENAMES = [title + ext\n                     for title in SUPPORTED_TITLES\n                     for ext in SUPPORTED_EXTENSIONS]\n```\n\n\n#### DEFAULT_FILENAME\n\nThis constant contains the default Readme filename, namely:\n\n```python\nDEFAULT_FILENAME = DEFAULT_FILENAMES[0]  # README.md\n```\n\n\n#### DEFAULT_GRIPHOME\n\nThis constant points to the default value if the `GRIPHOME`\n[environment variable](#environment-variables) is not specified.\n\n```python\nDEFAULT_GRIPHOME = '~/.grip'\n```\n\n\n#### DEFAULT_GRIPURL\n\nThe default URL of the Grip server and all its assets:\n\n```python\nDEFAULT_GRIPURL = '/__/grip'\n```\n\n\n#### DEFAULT_API_URL\n\nThe default app_url value:\n\n```python\nDEFAULT_API_URL = 'https://api.github.com'\n```\n\n\nTesting\n-------\n\nInstall the package and test requirements:\n\n```console\n$ pip install -e .[tests]\n```\n\nRun tests with [pytest][]:\n\n```console\n$ pytest\n```\n\nOr to re-run tests as you make changes, use [pytest-watch][]:\n\n```console\n$ ptw\n```\n\n\n#### External assumption tests\n\nIf you're experiencing a problem with Grip, it's likely that an assumption made\nabout the GitHub API has been broken. To verify this, run:\n\n```console\n$ pytest -m assumption\n```\n\nSince the external assumptions rely on an internet connection, you may want to skip\nthem when developing locally. Tighten the cycle even further by stopping on the\nfirst failure with `-x`:\n\n```console\n$ pytest -xm \"not assumption\"\n```\n\nOr with [pytest-watch][]:\n\n```console\n$ ptw -- -xm \"not assumption\"\n```\n\n\nContributing\n------------\n\n1. Check the open issues or open a new issue to start a discussion around\n   your feature idea or the bug you found\n2. Fork the repository and make your changes\n3. Open a new pull request\n\nIf your PR has been waiting a while, feel free to [ping me on Twitter][twitter].\n\nUse this software often? \u003ca href=\"https://saythanks.io/to/joeyespo\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg\" align=\"center\" alt=\"Say Thanks!\"\u003e\u003c/a\u003e\n:smiley:\n\n\n[pypi]: http://pypi.python.org/pypi/grip/\n[markdown]: http://developer.github.com/v3/markdown\n[rdd]: http://tom.preston-werner.com/2010/08/23/readme-driven-development.html\n[authors.md]: AUTHORS.md\n[offline-renderer]: http://github.com/joeyespo/grip/tree/offline-renderer\n[personal access token]: https://github.com/settings/tokens/new?scopes=\n[keychain-access]: https://gist.github.com/klmr/3840aa3c12f947e4064c\n[task-lists]: https://github.com/blog/1825-task-lists-in-all-markdown-documents\n[user-content]: http://github.github.com/github-flavored-markdown\n[python-markdown]: http://github.com/waylan/Python-Markdown\n[flask.run]: http://flask.pocoo.org/docs/0.10/api/#flask.Flask.run\n[flask.debug]: http://flask.pocoo.org/docs/0.10/api/#flask.Flask.debug\n[pytest]: http://pytest.org/\n[pytest-watch]: https://github.com/joeyespo/pytest-watch\n[twitter]: http://twitter.com/joeyespo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyespo%2Fgrip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeyespo%2Fgrip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyespo%2Fgrip/lists"}