{"id":27138731,"url":"https://github.com/franalgaba/nile-plugin-example","last_synced_at":"2025-04-08T04:54:49.465Z","repository":{"id":42206594,"uuid":"474096487","full_name":"franalgaba/nile-plugin-example","owner":"franalgaba","description":"OpenZeppelin Nile Plugin example","archived":false,"fork":false,"pushed_at":"2022-04-10T13:05:45.000Z","size":27,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-09T05:36:09.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/franalgaba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-25T17:02:24.000Z","updated_at":"2022-09-29T19:01:48.000Z","dependencies_parsed_at":"2022-08-12T09:31:32.822Z","dependency_job_id":null,"html_url":"https://github.com/franalgaba/nile-plugin-example","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franalgaba%2Fnile-plugin-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franalgaba%2Fnile-plugin-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franalgaba%2Fnile-plugin-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franalgaba%2Fnile-plugin-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/franalgaba","download_url":"https://codeload.github.com/franalgaba/nile-plugin-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247779723,"owners_count":20994572,"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":[],"created_at":"2025-04-08T04:54:48.958Z","updated_at":"2025-04-08T04:54:49.452Z","avatar_url":"https://github.com/franalgaba.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nile plugin example :boat:\n\nThis project is an example plugin for extending functionality in Nile.\n\n## Installation\n\n`pip install nile-greet`\n\n## Usage\n\nAfter installing you should already have the command available for usage. Run `nile --help` for checking the `nile greet` availability.\n\n## Development\n\nFor creating new plugins follow this instructions below.\n\n1. Install Poetry:\n\n`curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -`\n\n2. Install dependencies:\n\n`poetry install`\n\nAfter having the environment setted up we can start developing. We will use `click` for extending Nile commands. All new commands must be implemented as `click.commands`. Find below an implementation design template:\n\n```python\n# First, import click dependency\nimport click\n\n# Decorate the method that will be the command name with `click.command` \n@click.command()\n# You can define custom parameters as defined in `click`: https://click.palletsprojects.com/en/7.x/options/\ndef my_command():\n    # Help message to show with the command\n    \"\"\"\n    Subcommand plugin that does something.\n    \"\"\"\n    # Done! Now implement your custom functionality in the command\n    click.echo(\"I'm a plugin overiding a command!\")\n```\n\nGreat! Now our new Nile command is ready to be used. For Nile to detect it make sure at least version `0.6.0` is installed. Then modify the `pyproject.toml` file as follows:\n\n```\n# We need to specify that click commands are Poetry entrypoints of type `nile_plugins`. Do not modify this\n[tool.poetry.plugins.\"nile_plugins\"]\n# Here you specify you command name and location \u003ccommand_name\u003e = \u003cpackage_method_location\u003e\n\"greet\" = \"nile_greet.main.greet\"\n```\n\n## Testing\n\n`poetry run pytest tests`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranalgaba%2Fnile-plugin-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffranalgaba%2Fnile-plugin-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranalgaba%2Fnile-plugin-example/lists"}