Skip to main content

syriantaxescli

A command-line tool for calculating and analyzing Syrian salary taxes, built with Typer and leveraging the syriantaxes library.

Features

  • Gross and Net Salary Calculations: Compute taxes for a given gross salary or determine the required gross salary for a target net salary.
  • Batch Calculations: Generate salary tables for a range of amounts.
  • Export Results: Output results to Excel (.xlsx), JSON, or JSONL files.
  • Rich CLI Output: Nicely formatted tables using rich.

Installation

pip install syriantaxescli

Usage

After installation, use the CLI tool:

sytax [COMMAND] [OPTIONS]

Commands

  • gross: Calculate taxes for a given gross salary and compensations.
  • net: Calculate gross salary and compensations for a given target net salary.
  • ar: Generate salaries for a range of amounts (amount range).

Options

  • Bracket configuration: --brackets-mins, --brackets-maxs, --brackets-rates
  • Compensation rate: --compensations-rate
  • Fixed tax rate, minimum allowed salary, social security options, and more.
  • Output file: --write-path (supports .xlsx, .json, .jsonl)

Example

sytax gross --gross-salary 1000000 --compensations 100000
sytax net --target-salary 900000 --compensations-rate 0.1
sytax ar --start 800000 --stop 1200000 --step 50000 --compensations-rate 0.1 --write-path results.xlsx

Project Structure

  • src/syriantaxescli/controllers.py: CLI entry point and command definitions.
  • src/syriantaxescli/services.py: Core tax calculation logic.
  • src/syriantaxescli/writers.py: Export utilities for Excel, JSON, and JSONL.
  • src/syriantaxescli/tables.py: Table formatting for CLI output.
  • src/syriantaxescli/schemas.py: Data models for salary and tax results.
  • src/syriantaxescli/options.py, dependencies.py, constants.py, callbacks.py: CLI options, validation, and configuration.

Environment Variables

You can configure the CLI using the following environment variables:

Variable Description
SYRIANTAXES_BRACKET_TAX_MINS List of minimum values for each tax bracket.
SYRIANTAXES_BRACKET_TAX_MAXS List of maximum values for each tax bracket.
SYRIANTAXES_BRACKET_TAX_RATES List of tax rates for each bracket.
SYRIANTAXES_TAXES_ROUNDING_METHOD Rounding method for taxes (see syriantaxes.RoundingMethod).
SYRIANTAXES_TAXES_ROUND_TO_NEAREST Value to which taxes are rounded (e.g., 100, 1).
SYRIANTAXES_MIN_ALLOWED_SALARY Minimum allowed gross salary for tax calculation.
SYRIANTAXES_FIXED_TAX_RATE Fixed tax rate to apply (if applicable).
SYRIANTAXES_SS_ROUNDING_METHOD Rounding method for social security calculations.
SYRIANTAXES_SS_ROUND_TO_NEAREST Value to which social security deductions are rounded.
SYRIANTAXES_MIN_SS_ALLOWED_SALARY Minimum allowed salary for social security calculations.
SYRIANTAXES_SS_DEDUCTION_RATE Social security deduction rate.

Requirements

  • Python 3.12+
  • syriantaxes
  • typer, typer-di, xlwings, rich

License

GNU General Public License v3 (GPLv3)

Release files for syriantaxescli 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for syriantaxescli 0.1.2
File Size Uploaded
syriantaxescli-0.1.2.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for syriantaxescli 0.1.2
File Interpreter ABI Platform
syriantaxescli-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / syriantaxescli-0.1.2.tar.gz

Download URL syriantaxescli-0.1.2.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ace78b168750a15e767e943f3840c5bc55c6557696cc20fe413a37f36fbb1b3a
BLAKE2b-256 checksum
How to use checksums
86d1d5f815b7ca4a4c84c1960a1116b58e8717398007682bab599fb7e2aab319
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / syriantaxescli-0.1.2-py3-none-any.whl

Download URL syriantaxescli-0.1.2-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
807260fae9dbbe0d698cfc48175c977f2d6cde92f91c11915e80d3330b809a32
BLAKE2b-256 checksum
How to use checksums
c1114a1a71f673ef96c039ea8d6f6769fd3efc129d88fae07d13796ebf5001c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page