Skip to main content

Add your description here

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syriantaxescli-0.1.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syriantaxescli-0.1.2-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file syriantaxescli-0.1.2.tar.gz.

File metadata

  • Download URL: syriantaxescli-0.1.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for syriantaxescli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ace78b168750a15e767e943f3840c5bc55c6557696cc20fe413a37f36fbb1b3a
MD5 8157184937ad9c49740d5588821f1904
BLAKE2b-256 86d1d5f815b7ca4a4c84c1960a1116b58e8717398007682bab599fb7e2aab319

See more details on using hashes here.

File details

Details for the file syriantaxescli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: syriantaxescli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for syriantaxescli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 807260fae9dbbe0d698cfc48175c977f2d6cde92f91c11915e80d3330b809a32
MD5 9b9f42c86f668b166f4a03bf9a66b24e
BLAKE2b-256 c1114a1a71f673ef96c039ea8d6f6769fd3efc129d88fae07d13796ebf5001c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page