Skip to content

Commit 29961e3

Browse files
authored
Update README.md and add overview table (#29)
1 parent d44e8af commit 29961e3

File tree

2 files changed

+67
-11
lines changed

2 files changed

+67
-11
lines changed

README.md

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,62 @@ $ localstack extensions --help
2424

2525
Usage: localstack extensions [OPTIONS] COMMAND [ARGS]...
2626

27-
Manage LocalStack extensions (beta)
27+
(Beta) Manage LocalStack extensions.
28+
29+
LocalStack Extensions allow developers to extend and customize LocalStack.
30+
The feature and the API are currently experimental and may be subject to
31+
change.
32+
33+
Visit https://docs.localstack.cloud/references/localstack-extensions/
34+
for more information on LocalStack Extensions.
2835

2936
Options:
30-
--help Show this message and exit.
37+
-v, --verbose Print more output
38+
-h, --help Show this message and exit.
3139

3240
Commands:
33-
init Initialize the LocalStack extensions environment
34-
install Install a LocalStack extension
35-
uninstall Remove a LocalStack extension
41+
dev Developer tools for developing LocalStack extensions.
42+
init Initialize the LocalStack extensions environment.
43+
install Install a LocalStack extension.
44+
list List installed extension.
45+
uninstall Remove a LocalStack extension.
46+
3647
```
3748

3849
To install an extension, specify the name of the pip dependency that contains
3950
the extension. For example, for the official Stripe extension, you can either
4051
use the package distributed on pypi:
4152

4253
```console
43-
$ localstack extensions install localstack-extensions-stripe
54+
$ localstack extensions install localstack-extension-httpbin
4455
```
4556

46-
or you can install it directly from this git repository
57+
or you can install the latest version directly from this Git repository
4758

4859
```console
49-
$ localstack extensions install "git+https://github.com/localstack/localstack-extensions/#egg=localstack-extensions-stripe&subdirectory=stripe"
60+
$ localstack extensions install "git+https://github.com/localstack/localstack-extensions/#egg=localstack-extension-httpbin&subdirectory=httpbin"
5061
```
5162

63+
## Official LocalStack Extensions
64+
65+
Here is the current list of extensions developed by the LocalStack team and their support status.
66+
You can install the respective extension by calling `localstack install <Install name>`.
67+
68+
| Extension | Install name | Version | Support status |
69+
| --------- | ------------ | ------- | -------------- |
70+
| [AWS replicator](https://github.com/localstack/localstack-extensions/tree/main/aws-replicator) | localstack-extension-aws-replicator | 0.1.0 | Experimental |
71+
| [Diagnosis Viewer](https://github.com/localstack/localstack-extensions/tree/main/diagnosis-viewer) | localstack-extension-diagnosis-viewer | 0.1.0 | Stable |
72+
| [Hello World](https://github.com/localstack/localstack-extensions/tree/main/hello-world) | localstack-extension-hello-world | 0.1.0 | Stable |
73+
| [httpbin](https://github.com/localstack/localstack-extensions/tree/main/httpbin) | localstack-extension-httpbin | 0.1.0 | Stable |
74+
| [MailHog](https://github.com/localstack/localstack-extensions/tree/main/mailhog) | localstack-extension-mailhog | 0.1.0 | Stable |
75+
| [Miniflare](https://github.com/localstack/localstack-extensions/tree/main/miniflare) | localstack-extension-miniflare | 0.1.0 | Experimental |
76+
| [Stripe](https://github.com/localstack/localstack-extensions/tree/main/stripe) | localstack-extension-stripe | 0.1.0 | Stable |
77+
78+
5279
## Developing Extensions
5380

81+
This section provides a brief overview of how to develop your own extensions.
82+
5483
### The extensions API
5584

5685
LocalStack exposes a Python API for building extensions that can be found in
@@ -134,8 +163,8 @@ from localstack.extensions.api import Extension
134163

135164
LOG = logging.getLogger(__name__)
136165

137-
class ReadyAnnoucerExtension(Extension):
138-
name = "my_ready_annoucer"
166+
class ReadyAnnouncerExtension(Extension):
167+
name = "my_ready_announcer"
139168

140169
def on_platform_ready(self):
141170
LOG.info("my plugin is loaded and localstack is ready to roll!")
@@ -169,7 +198,7 @@ install_requires =
169198

170199
[options.entry_points]
171200
localstack.extensions =
172-
my_ready_annoucer = localstack_annoucer.extension:ReadyAnnoucerExtension
201+
my_ready_announcer = localstack_announcer.extension:ReadyAnnouncerExtension
173202
```
174203

175204
The entry point group is the Plux namespace `locastack.extensions`, and the

bin/generate-extension-table.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env python
2+
3+
import configparser
4+
import glob
5+
import os
6+
7+
8+
def main():
9+
root_path = os.path.join(os.path.dirname(__file__), '..')
10+
11+
distributions = []
12+
for match in glob.glob("**/setup.cfg", root_dir=root_path):
13+
cfg = configparser.ConfigParser()
14+
cfg.read(os.path.join(root_path, match))
15+
16+
distributions.append(cfg['metadata'])
17+
18+
print("| Extension | Install name | Version | Support status |")
19+
print("| --------- | ------------ | ------- | -------------- |")
20+
21+
for metadata in sorted(distributions, key=lambda k: k['name']):
22+
display_name = metadata['summary'].removeprefix("LocalStack Extension: ")
23+
print(f"| [{display_name}]({metadata['url']}) | {metadata['name']} | {metadata['version']} | ? |")
24+
25+
26+
if __name__ == "__main__":
27+
main()

0 commit comments

Comments
 (0)