Modules
The reference module
The reference module on GitHub, what is in it, and how to start from it.
A module finds records for Tommos: open tenders (a bid) or companies (a prospect). You write one function,
find. Tommos runs it on its own schedule, in a sandbox, and checks every record before it takes it.
This repository is the reference module. Fork it, put your logic in find, push a tag, and give the link to the
owner of the workspace. They add it in Settings, Scouts.
Quick start
npm install
pip install -r requirements.txt
npx tommos-module check . --entry find.ts
npx tommos-module check . --entry find.pyBoth entries pass on the example. Then change manifest.json, write your find, record an example, and run the
check again.
The guide
- Overview and quick start
- The manifest
- The contracts: Bid and Prospect
- The function find
- The tools
- The log
- The check
- Give your module to a workspace
What is in this repository
| Path | What it is |
|---|---|
manifest.json | The module's name, kind, schedule, secrets, hosts and time limit |
find.ts, find.py | The same module in TypeScript and in Python: the open notices of a fictional register |
data/fictional-notices.json | The fictional register the bid example reads over raw.githubusercontent.com: no buyer, notice or amount in it is real |
examples/ | A copy of that register, and the records find must give for it |
prospect-example/ | A whole prospect module: the products launched on Hacker News with «Show HN» |
package.json, requirements.txt | The tools of Tommos, by version |
.github/workflows/check.yml | The same check Tommos runs, on each push |
docs/ | This guide |