You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also see [this paper](https://doi.org/10.48550/arXiv.1905.08674) for an overview and
81
82
recommendations on the state of software citation in academic practice.
@@ -123,6 +124,39 @@ project contributors.
123
124
124
125
You can find a demo repository generated from this template [here](https://github.com/Materials-Data-Science-and-Informatics/fair-python-cookiecutter-demo).
125
126
127
+
### Example Code
128
+
129
+
When you are creating your project, you are asked for several inputs. You can have an example CLI(Command Line Interface) and/or API(Application Programming interface) code within your new project.
130
+
131
+
Lets assume your project name is `my-awesome-project`.
132
+
133
+
You can run the CLI App with below command. For further usage, please check typer documentation.
134
+
135
+
```bash
136
+
poetry shell
137
+
138
+
# Run your CLI App
139
+
my-awesome-project-cli calculate add 5 2
140
+
```
141
+
142
+
You can run the API App with below command.
143
+
144
+
```bash
145
+
poetry shell
146
+
147
+
# Run the API program, it will be open for connection
148
+
my-awesome-project-api
149
+
```
150
+
151
+
Now, you can a tool to send a HTTP request for the API. You can open another terminal and run this command
152
+
153
+
```
154
+
# send a request that does the same thing as the CLI
0 commit comments