{"id":22491698,"url":"https://github.com/almpartners/palje","last_synced_at":"2025-08-03T00:31:12.452Z","repository":{"id":57450328,"uuid":"335620917","full_name":"ALMPartners/palje","owner":"ALMPartners","description":"A tool for creating hierarchical documentation of SQL Server databases to Confluence wiki","archived":false,"fork":false,"pushed_at":"2024-09-27T05:25:32.000Z","size":326,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-06T04:10:42.607Z","etag":null,"topics":["confluence","database","documentation","mssql"],"latest_commit_sha":null,"homepage":"","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/ALMPartners.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-02-03T12:42:17.000Z","updated_at":"2024-09-27T05:25:18.000Z","dependencies_parsed_at":"2024-05-30T09:59:50.239Z","dependency_job_id":"245a1a81-2ea8-4921-92da-3f831fc60ef6","html_url":"https://github.com/ALMPartners/palje","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"41f3e9a9c85775b61082fb921e2dc70aaf69f783"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALMPartners%2Fpalje","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALMPartners%2Fpalje/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALMPartners%2Fpalje/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALMPartners%2Fpalje/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ALMPartners","download_url":"https://codeload.github.com/ALMPartners/palje/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228508035,"owners_count":17931263,"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":["confluence","database","documentation","mssql"],"created_at":"2024-12-06T18:09:11.464Z","updated_at":"2025-08-03T00:31:12.433Z","avatar_url":"https://github.com/ALMPartners.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Palje\n====================\n\n# Description\nPalje is a tool for creating hierarchical documentation of SQL Server databases to Confluence and managing Confluence content.\n\n# Dependencies\nSee [pyproject.toml](./pyproject.toml)\n\n# Install Guide\n\n## PyPI\nInstall from the [Python Package Index](https://pypi.org/) with the following command:\n\n```\npip install palje\n```\n\n## Clone and install\n1. Clone this repository\n2. Install with pip\n\n```\ncd .\\palje\npip install .\n```\n\n## Development environment\n\nInstall and set up dev and test tooling with commands:\n\n```\npip install -e .[dev, test]\npre-commit install\n```\n\nThis takes `black` code formatting (and other tools) into use via `pre-commit`.\n\n# Usage\n\nAfter successful installation, there are three new commands available: `palje`, `palje-gui`, and `palje-old`.\n\nPalje can be used either as a CLI tool (`palje`, `palje-old`) or via (limited) graphical user interface (`palje-gui`).\n\n## Prerequisites\n\nBefore use, you should ensure that you have the following:\n\n- Read access to a MSSQL database you wish to document\n    - Documentation is generated from the database metadata that is read from the database(s), information schema and system views\n    - You can use either SQL authentication, AAD, or Windows authentication\n\n- Read/Write access to a Confluence space to work with via Atlassian API Token\n    - In addition to db document creation, you may also sort and delete Confluence pages and page hierarchies\n    - Palje uses your registered account email and API token to authenticate to Confluence Cloud\n        - Go to https://id.atlassian.com/manage/api-tokens\n        - Choose \"Create API token\"\n        - Give it a name\n        - Token password will be created automatically, save this password\n\n## Remarks on compatibility\n\n- Palje has been tested on multiple SQL Server versions, including [SQL Server images](https://hub.docker.com/_/microsoft-mssql-server)\n- Palje has been tested on cloud database instances, such as Azure SQL Database\n    - Palje supports Azure Active Directory authentication with argument --authentication \"AAD\"\n- Palje has been tested to work with Confluence Cloud only\n\n## Graphical user-interface\n\nNotice that GUI may be lacking some of the features that are available via CLI.\n\n![Page hierarchy in Confluence](./images/palje_gui.PNG?raw=true)\n\nLaunch Palje GUI from a shell with command:\n\n```\npalje-gui\n```\n\nSee the CLI documentation below for information on various parameters - it all applies to GUI, too.\n\n\n## CLI and arguments\n\nSee online help for up-to-date documentation for top-level options and sub-commands.\n\nEspecially notice the `--yes-to-all` option that can be given to the root command to avoid all user input - this is esssential for scripted use!\n\n```\npalje --help\n```\n\nTo see specific documentation for a sub-command, use the --help switch _after_ the sub-command e.g.\n\n```\npalje document --help\npalje delete --help\npalje sort --help\n```\n\n### Parameters from ENV vars\n\nMany parameters (e.g. various authentication params) can be set into ENV variables from where they are automatically read at runtime. This makes continous use more user-friendly: less repetative typing, shorter and clearer commands, sensitive data stays out of sight, etc.\n\nNotice that using ENV vars is optional: alternatively you can type parameters on the command line and/or leave them off and let `palje` interactively prompt for any required parameter values.\n\nSee the online-documentation for supported ENV vars and their exact names.\n\nExample of setting some ENV vars in PowerShell:\n\n```\n$env:SOURCE_PALJE_ATLASSIAN_USER_ID = \"firstname.lastname@organization.org\"\n$env:SOURCE_PALJE_ATLASSIAN_API_TOKEN = \"S3CR3T\"\n$env:PALJE_DB_SERVER = \"localhost,14330\"\n...\n```\n\nIf you want to unset an ENV var in PowerShell, you can do it by setting its value to `$null`:\n\n```\n$env:PALJE_DB_PASSWORD = $null\n```\n\n### Experimental features\n\nThere may be some features in `palje` that are ~somewhat usable but known to be still incomplete or unreliable e.g. due to unresolved issues with Confluence Cloud REST API.\n\nBy default, these experimental features are hidden from the user and not available in regular use.\n\nTo make experimental features available, set some value to the special `PALJE_EXPERIMENTAL_FEATURES_ENABLED` enviroment variable.\n\n```\nPS \u003e $env:PALJE_EXPERIMENTAL_FEATURES_ENABLED = \"1\"\nPS \u003e palje --help\nExperimental features enabled.\nUsage: palje [OPTIONS] COMMAND [ARGS]...\n...\nCommands:\n  copy      Experimental: Copy pages or page hierarchies between...\n...\n```\n\n## Legacy CLI and arguments (deprecated)\n\nThe old `palje` CLI is still available as `palje-old` command.\n\nNotice that the old CLI is **deprecated** and will be dropped completely in the near future.\n\nSee online help for up-to-date documentation for available options.\n```\npalje-old -h\n```\n\n### Basic syntax\n\n```\npalje-old confluence-url space server database\n                --parent-page PARENT_PAGE\n                --schemas SCHEMAS [SCHEMAS ...]\n                --dependent DEPENDENT [DEPENDENT ...]\n                --db-driver DB_DRIVER\n                --authentication AUTHENTICATION\n```\n\n| Argument  | Required | Description | Type | Default Value |\n| --- | --- | --- | --- | --- |\n| confluence-url | Yes | The organisation's atlassian root page, https://\u003cyour-org\u003e.atlassian.net/ | str |  |\n| space | Yes | Space key of the Confluence space, in which the documentation is created | str |  |\n| server | Yes | Host name of the SQL Server. Include port with comma | str |  |\n| database | Yes | Name of the database that is documented | str |  |\n| parent-page | No | Name or title of the Confluence page, under which the documentation is created | str | If page is not given, the documentation will be created to top level (under pages) |\n| schemas | No | Names of the schemas that are documented | list of str | If schemas not given, all schemas will be documented |\n| dependent | No | Names of the databases, where object dependencies are sought | list of str | If databases not given, dependencies are sought only in documented database |\n| db-driver | No | Name of the database driver | str | \"ODBC Driver 17 for SQL Server\" |\n| authentication | No | Authentication method to use. Options are \"SQL\", \"Windows\", \"AAD\" and \"AzureIdentity\". | str | \"SQL\"\n\n\n## Usage example\n\n```\npalje-old \"https://\u003cyour-org\u003e.atlassian.net/\" TEST \"localhost,1433\" MY_DB --schemas dbo store --dependent MY_OTHER_DB --authentication \"SQL\"\n```\n\n## Testing\n\nInstall palje with testing depencies.\n\n```\npip install .[test]\n```\n\n### Run unit tests with pytest\n\n```\npytest\n```\n\n### Run unit tests for all supported, installed Python versions with tox\n\n```\ntox\n```\n\n## Creating MSI installers\n\nPalje can be packaged into an MSI installer which can be used for installing palje into Windows environments and easily apply updates on it later.\n\nMSI installers are self-contained, meaning that the package contains everything that is needed for running Palje (e.g. required parts of Python installation and all the 3rd party libraries and their dependencies are included).\n\n### Types of MSI installers\n\nThere two types of installers, `user` and `system`. The `user` installer is suitable for single-user installations e.g. for a user who wants to run palje on their own workstation. For shared use, e.g. Azure Virtual Desktop, the `system` installer may be the better option: once installed, the tools are available for all users on that machine.\n\n**Notice:** using the `system` installer requires administrator priviledges.\n\n### Local MSI builds\n\n**Notice:** make sure you are using a supported Python version (see [msi_build.py](./msi_build.py)).\n\nTo set up an environment for MSI builds, create a new venv, activate it, and install build dependencies.\n\n```\npython venv buildvenv\n./buildvenv/Scripts/activate\npip install .[msibuild]\n```\n\nTo build a `user` installer, use commands:\n\n```\n$env:PALJE_MSI_TARGET_TYPE=\"user\"\npython ./msi_build.py bdist_msi\n```\n\nTo build a `system` installer, use commands:\n\n```\n$env:PALJE_MSI_TARGET_TYPE=\"system\"\npython ./msi_build.py bdist_msi\n```\n\n**Notice:** if you make changes to the code, you __must re-install the palje__ package (`pip install .` or `pip install .[msibuild]`) into the build venv for the changes to be included in the next MSI build. Editable installs don't work here, so don't use them!\n\n# License\nCopyright 2021 ALM Partners Oy\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmpartners%2Fpalje","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falmpartners%2Fpalje","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmpartners%2Fpalje/lists"}