Bot framework for camptocamp.org
pip install campbotEvery request sends a User-Agent header like
CampBot/2.2.0 (+https://github.com/c2corg/CampBot).
If you build a tool on CampBot, put its name first:
from campbot import CampBot
bot = CampBot(user_agent="MyTool/1.2 (+https://example.org/mytool)")
# User-Agent: MyTool/1.2 (+https://example.org/mytool) CampBot/2.2.0 (+https://github.com/c2corg/CampBot)On the command line, use --user-agent=MyTool/1.2.
The camptocamp.org team can then tell your traffic apart from other CampBot users, and contact you rather than block it if something goes wrong.
git clone git@github.com:c2corg/CampBot.git
cd CampBot
pip install -r requirements.txt -r dev-requirements.txt black==19.10b0
pytest --cov=campbot --cov-report=htmlBefore commit, check your format with black campbot 🙏