{"id":17551029,"url":"https://github.com/brianlusina/avatar-bot","last_synced_at":"2026-04-18T02:32:02.118Z","repository":{"id":54569918,"uuid":"196246723","full_name":"BrianLusina/avatar-bot","owner":"BrianLusina","description":"Telegram Bot to create Avatars","archived":false,"fork":false,"pushed_at":"2023-08-04T06:24:12.000Z","size":660,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-29T07:29:31.086Z","etag":null,"topics":["flask","python","telegram-bot"],"latest_commit_sha":null,"homepage":"https://t.me/conjectus_bot","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BrianLusina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-10T17:18:23.000Z","updated_at":"2022-12-08T10:03:31.000Z","dependencies_parsed_at":"2024-12-09T09:33:07.774Z","dependency_job_id":"473f6eef-8cec-4fae-89f1-cd2f6813feef","html_url":"https://github.com/BrianLusina/avatar-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/BrianLusina/avatar-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLusina%2Favatar-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLusina%2Favatar-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLusina%2Favatar-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLusina%2Favatar-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrianLusina","download_url":"https://codeload.github.com/BrianLusina/avatar-bot/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLusina%2Favatar-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","python","telegram-bot"],"created_at":"2024-10-21T04:44:40.426Z","updated_at":"2026-04-18T02:32:02.104Z","avatar_url":"https://github.com/BrianLusina.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Avatar Bot\n\n[![Build Status](https://travis-ci.org/BrianLusina/avatar-bot.svg?branch=develop)](https://travis-ci.org/BrianLusina/avatar-bot)\n[![codecov](https://codecov.io/gh/BrianLusina/avatar-bot/branch/develop/graph/badge.svg)](https://codecov.io/gh/BrianLusina/avatar-bot)\n\nSimple Telegram Bot that sends you avatar images based on simple words you send it. The images are pulled from [Adorable Avatars](http://avatars.adorable.io/)\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing \npurposes. \nSee [deployment](./README.md#Deployment) for notes on how to deploy the project on a live system.\n\n\n### Pre-requisites\n\nAny editor of your choice can be used for this application.\n\n1. [Python](https://www.python.org)\n\n   This project has been built with Python 3.7. Ensure that you install this version of Python as outlined in the \n   link provided [here](https://www.python.org/downloads/)\n\n2. [Pip](https://pip.pypa.io/en/stable/)\n    \n   This is a package manager for Python applications and will be useful when handling dependencies\n   for this application. Installations instructions can be found in the link int the title.\n\n3. [Pipenv](https://pipenv.readthedocs.io/en/latest/)\n\n   An awesome dependency management tool for Python and is highly recommended. This is the preferred \n   tool of choice for this project. This allows use to separate between dev dependencies and dependencies\n    \n4. [Docker](https://www.docker.com/)\n    \n   This will be used when containerizing the application for running in a SOA(Service Oriented Architecture). This is\n   used especially when deployment. Allows this application to run in any environment with minimal configuration.\n\n### Installing\n\nTo get up and running you will need to do the following:\n\n1. _Install dependencies_\n   \n   Install required dependencies of this project using pipenv, which is the required dependency management tool\n   for this project. to install dependencies, simply use command in your terminal at the root of the project:\n   \n   ```bash\n   pipenv install\n   ```\n   \n   \u003e This will automatically create a virtual environment for you and give further instructions on how to activate it\n\n2. _Configure environment variables for the project_.\n   \n   This application has been structured in order to be portable. For this to happen, environment variables are used for some\n   configuration settings. Example is a database connection. This is left to the user to setup database connection string\n   in order not to be tied to a specific database. Another example is the port. A reasonable default is used, however, if \n   this default does not suit your needs, a PORT environment variable can be used. \n   \n   In order to achieve this, create a `.env` file at the root of the project ad add these environment variables:\n   \n   ```.dotenv\n   TOKEN=\u003cTELEGRAM_BOT_TOKEN\u003e\n   URL=\u003cURL\u003e\n   PORT=7000\n   FLASK_ENV=development\n   ``` \n   \u003e These environment variables can then be passed on to the application. Note that the strings in \u003c\u003e are place holders\n   \u003e and are used to demonstrate where the values will go for the environment variables\n   \n   i. __Telegram Bot Token__\n    \n    To get this token, you will need a Telegram account, which you can sign up [here](https://telegram.org/). To create a chat\n    bot on Telegram, you will need to contact the [BotFather](https://telegram.me/BotFather). The command you need is `/newbot`:\n    \n    ![botfather](./art/botfather.png)\n    \u003e a sample chat with the BotFather\n    \n    It will give you more instructions on how to setup your bot. Once the bot is setup, you will see a token (which is hashed out\n    in the image above). That is the token you will use for the bot and set in the `TOKEN` environment variable\n    \n   ii. __Hosting URL__\n     \n    Once the application is hosted(You can choose whichever platform to host it), you will need to setup the webhook \n    for Telegram to post your messages to. Get the URL that the application will be exposed to and add it as an environment\n    variable (URL=\u003cURL_THAT_IS_EXPOSED_BY_THE_HOSTING_PLATFORM_YOU_PICK\u003e) \n    \n    Next, will be to setup the Webhook by running the command:\n    \n    ``` bash\n    python manage.py setup_webhook\n    ```  \n   \n   iii. __Flask Environment__\n    \n    The FLASK_ENV environment variable determines the configuration to use. Various configurations are found [here](./app/config.py)\n    For local development, you can use `development`, for production, it is advised to use `production`\n\nThis is a sample conversion with the resulting bot:\n\n![avatar bot](./art/avatar-bot.png)\n\n\n### Testing\n\nThe application tests can be found under [tests](./tests) directory and are structure in a similar manner to the application\ncode.\n\nTest framework used is [Pytest](https://pytest.org/) and can be used as follows:\n\n```bash\npytest\n```\n\u003e This will discover all tests under [tests](./tests) directory\n\nIn case of running a coverage report simply use:\n\n```bash\npytest --cov=app tests/\n```\n\u003e Will run a coverage report using the plugin [pytest-cov](https://github.com/pytest-dev/pytest-cov)\n\nTo generate a test report run\n\n```bash\ncoverage html\n```\n\u003e This will generate a HTML file report that will be stored under coverage directory(This is not pushed to a VCS)\n\nSettings and configuration for [coverage](https://coverage.readthedocs.io) can be found in the file [.coveragerc](./.coveragerc)\n\n## Deployment\n\nDeployment can be done on any hosting platform that supports running a Python application. In this case, [Heroku](https://www.heroku.com/) has been used.\nHowever, any other hosting platform can be used. This goes as far as setting up a [Dockerfile](./Dockerfile) for those wishing\nto deploy this as a micro-service in a larger Service Oriented Architecture.\n\n## Built With\n\n1. [Python](https://www.python.org/) - Source language\n2. [Pytest](https://pytest.org/) - Python Test Framework\n3. [Flask](http://flask.pocoo.org/) - Python Web Framework\n\n## Contributing\n\nPlease read [contributing guide](./.github/CONTRIBUTING.md) for more information\n\n## Versioning\n\nWe use [SemVer](https://semver) for versioning.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianlusina%2Favatar-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianlusina%2Favatar-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianlusina%2Favatar-bot/lists"}