{"id":18867866,"url":"https://github.com/TrustSource/ts-samples-python","last_synced_at":"2026-02-13T16:30:19.040Z","repository":{"id":99726804,"uuid":"331365092","full_name":"TrustSource/ts-samples-python","owner":"TrustSource","description":"saple project to demosntrate TrustSource functionality","archived":false,"fork":false,"pushed_at":"2021-01-20T17:18:02.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-20T09:52:00.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TrustSource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-01-20T16:28:42.000Z","updated_at":"2025-02-19T21:05:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"57f98aea-9256-423b-9661-7d259f229353","html_url":"https://github.com/TrustSource/ts-samples-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrustSource%2Fts-samples-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrustSource%2Fts-samples-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrustSource%2Fts-samples-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrustSource%2Fts-samples-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TrustSource","download_url":"https://codeload.github.com/TrustSource/ts-samples-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239816482,"owners_count":19701753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-08T05:11:39.978Z","updated_at":"2026-02-13T16:30:18.985Z","avatar_url":"https://github.com/TrustSource.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Supported Versions](https://img.shields.io/badge/Python-3.6,%203.7,%203.8,%203.9-blue) \n![License](https://img.shields.io/badge/License-Apache--2.0-green)\n\n# TrustSource Python sample project \n\nSample [TrustSource](https://app.trustsource.io/) integration of a minimal Python application based on the popular web application framework [Flask](https://flask.palletsprojects.com).  \n\n# Getting started / set up\n\nThe minimal application is created using the official Flask tutorial available at [Quickstart - A Minimal Application](https://flask.palletsprojects.com/en/1.1.x/quickstart/#a-minimal-application).\n\nThis example is based on Python 3, we recommend to use at least python 3.6. For package management we use pip together with virtual environments.  \n\nLet's start with cloning the sample application.\n\n```\n# clone a repo\ngit clone https://github.com/trustsource/ts-python-sample\ncd ts-python-sample\n```\n\nCreate a virtual envorinment for the project and activate it:\n\n```\n# create a virtual environment\npython3 -m venv ./venv\n# activate the newly created environment\nsource venv/bin/activate\n```\n\nInstall required software:\n\n```\n# install Flask and the TrustSource scanner\npip install -r requirements.txt\n```\n\nEnsure that the web application works (press CTRL-C to terminate the application):\n\n```\n# run web application\nexport FLASK_APP=hello.py \npython -m flask run\n```\n\n\n# Scan and dependency analysis\n\nTo scan the application using the TrustSource scanner, execute the following command:\n\n```\n# scan application\nts-pip-plugin ./\n```\n\nThe scan results will be printed into the console. To submit the results to the [TrustSource](https://app.trustsource.io/) and execute analysis you need to register in the application first, generate an API-key and create a project. Please visit [TrustSource](https://app.trustsource.io/) for more details. \n\nBefore the submitting the result, please, create a TrustSource project file **ts-plugin.json** in the sample directory with the following content:\n\n```\n{\n  \"project\" : \"your project name\",\n  \"apiKey\" : \"your API key\",\n  \"skipTransfer\" : false\n}\n```\n\nExecute the scan again using the following command:\n\n```\n# scan application\nts-pip-plugin ./\n```\n\nIf everything is set correctly you will see a message \"Transfer success!\". Open the web application to see results and execute analysis.\n\n# Contribution, Contact and Support\nFeel free to reach out to the [TrustSource Team](https://support.trustsource.io/hc/en-us/requests/new \"TrustSource Knowledgebase\") by dropping us a message or providing [issues](/org/ts-deepscan/issues). We 'ld love o hear your feedback to learn and improve.\nContributions are welcome. Just clone, create your branch and send a pull request. Please make sure to agree to the [contribution agreement](/org/ContributionAgreeemnt.md \"Contribution Agreement\") and the [coding guidelines](/org/CodingGuidelines.md \"Coding Guidelines\").\n\nIf you like the tool and want to support our further work, feel free to support us with donations or sign a API-usage agreement.\nThank you \u0026 best regards!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTrustSource%2Fts-samples-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTrustSource%2Fts-samples-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTrustSource%2Fts-samples-python/lists"}