- Create the initial project on PyPI manually via twine
- Create an API token for PyPI with it's scope limited to the project
- Add the API token to the GitLab project under CI/CD - Variables:
TWINE_USERNAME=__token__TWINE_PASSWORD= The API Token. Starts withpypi-
- Set the variables as "Masked" to prevent them from showing up in log files
- Add a deploy section to your
.gitlab.ci.yaml - To execute add a new tag to your commit
Important:
This version is outdated and no longer maintained. Your find the current version in the Alliance Auth documentation: Direct Link
This docunent describes step-by-step how to setup a complete development environment for Alliance Auth apps on Windows 10 with Windows Subsystem for Linux (WSL) and Visual Studio Code.
The main benefit of this setup is that it runs all services and code in the native Linux environment (WSL) and at the same time can be full controlled from within a comfortale Windows IDE (Visual Studio Code) including code debugging.
In addition all tools described in this guide are open source or free software.
| # fetching a private Slack file with requests | |
| import requests | |
| import os | |
| slack_token = os.environ['SLACK_TOKEN'] | |
| url = 'https://files.slack.com/files-pri/T12345678-F12345678/my_file.jpg' | |
| res = requests.get(url, headers={'Authorization': f'Bearer {slack_token}'}) | |
| res.raise_for_status() |
One of the big advantages of Alliance Auth (AA) is that can be easily extended with custom apps. So with a little Python and Django know-how you can quickly add your own apps to AA's web portal and make use of AA's permission system.
To help you get up to speed quickly here is how you can setup a dev environment on Windows.
This guide is for Windows, because some devs will find it more comfortable to develop in a Windows environment. However, AA does not officially support Windows, so this approach comes with some limitations. Please also see our other guide based on WSL for Winddows 10, which does not hav any of these limitations.
| var SLACK_ACCESS_TOKEN = PropertiesService.getScriptProperties().getProperty('SLACK_ACCESS_TOKEN'); | |
| function doGet(e) { | |
| return ContentService.createTextOutput("I am alive"); | |
| } | |
| function doPost(e) { | |
| var params = e.parameter; | |
| var token = params.token; | |
| var text = params.text; |
| // This is a basic HTTP service for creating new Oauth tokens for Slack apps in .NET Core | |
| using System; | |
| using System.Net; | |
| using System.Threading; | |
| using Newtonsoft.Json; | |
| using System.Collections.Generic; | |
| using System.Text; | |
| using System.Linq; | |
| using System.Collections.Specialized; |
| <?php | |
| /** | |
| * Checks if all characters of a given string are supported by OTF file | |
| * Outputs the findings in a simple HTML table | |
| * | |
| * Needs: php-font-lib @ https://github.com/PhenX/php-font-lib | |
| */ | |
| require_once "../src/FontLib/Autoloader.php"; |
| <?php | |
| /** | |
| * Checks if all characters of a given string are supported by OTF file | |
| * Outputs the findings in a simple HTML table | |
| * | |
| * Needs: php-font-lib @ https://github.com/PhenX/php-font-lib | |
| */ | |
| require_once "../src/FontLib/Autoloader.php"; |