Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nalgeon/codapi
Interactive code examples for documentation, education and fun
https://github.com/nalgeon/codapi
code-playground interactive-code interactive-snippets playground sandbox snippets
Last synced: about 1 month ago
JSON representation
Interactive code examples for documentation, education and fun
- Host: GitHub
- URL: https://github.com/nalgeon/codapi
- Owner: nalgeon
- License: apache-2.0
- Created: 2023-11-24T22:24:22.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-12T22:04:34.000Z (5 months ago)
- Last Synced: 2024-09-27T04:42:30.855Z (about 1 month ago)
- Topics: code-playground, interactive-code, interactive-snippets, playground, sandbox, snippets
- Language: Go
- Homepage: https://codapi.org
- Size: 86.9 KB
- Stars: 1,471
- Watchers: 13
- Forks: 73
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- my-awesome-list - codapi
- zero - codapi - 2.0 | (Members)
README
# Interactive code examples
_for documentation, education and fun_ 🎉
Codapi is a platform for embedding interactive code snippets directly into your product documentation, online course or blog post.
```
┌───────────────────────────────┐
│ def greet(name): │
│ print(f"Hello, {name}!") │
│ │
│ greet("World") │
└───────────────────────────────┘
Run ► Edit ✓ Done
┌───────────────────────────────┐
│ Hello, World! │
└───────────────────────────────┘
```Codapi manages sandboxes (isolated execution environments) and provides an API to execute code in these sandboxes. It also provides a JavaScript widget [codapi-js](https://github.com/nalgeon/codapi-js) for easier integration.
Highlights:
- Automatically converts static code examples into mini-playgrounds.
- Lightweight and easy to integrate.
- Sandboxes for any programming language, database, or software.
- Open source. Uses the permissive Apache-2.0 license.For an introduction to Codapi, see this post: [Interactive code examples for fun and profit](https://antonz.org/code-examples/).
## Installation
See [Installing Codapi](docs/install.md) for details.
## Usage
See [API](docs/api.md) to run sandboxed code using the HTTP API.
See [codapi-js](https://github.com/nalgeon/codapi-js) to embed the JavaScript widget into a web page.
## Contributing
Contributions are welcome. For anything other than bugfixes, please first open an issue to discuss what you want to change.
Be sure to add or update tests as appropriate.
## Support
Codapi is mostly a [one-man](https://antonz.org/) project, not backed by a VC fund or anything.
If you find Codapi useful, please star it on GitHub and spread the word among your peers. It really helps to move the project forward.
★ [Subscribe](https://antonz.org/subscribe/) to stay on top of new features.