Skip to content

Commit

Permalink
Merge pull request #26 from juerkkil/update_metadata_and_readme
Browse files Browse the repository at this point in the history
update pyproject.toml and README
  • Loading branch information
juerkkil authored Oct 25, 2024
2 parents 73b4b77 + 396243d commit a7debbf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 12 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)
MIT License

Copyright (c) 2016-2024 Jussi-Pekka Erkkila
Copyright (c) 2016 - 2024 Jussi-Pekka Erkkilä <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ With minor modifications could be used as a library for other projects.

The following assumes you have Python installed and command `python` refers to python version >= 3.8.

### Run without installation
### Install

1. Clone into repository
2. Run `python -m secheaders`
```
$ pip install secheaders
```

### Installation
### Building and running locally

1. Clone into repository
2. `python -m build`
3. `pip install dist/secheaders-0.1.0-py3-none-any.whl`
4. Run `secheaders --help`


### Running from source without installation

1. Clone into repository
2. Run `python -m secheaders`


### Usage
## Usage
```
$ secheaders --help
usage: secheaders [-h] [--max-redirects N] [--insecure] [--verbose] URL
Expand All @@ -44,7 +50,7 @@ options:
```


### Example output
## Example output
```
$ secheaders example.com
Header 'x-frame-options' is missing [ WARN ]
Expand All @@ -59,3 +65,16 @@ HTTPS supported [ OK ]
HTTPS valid certificate [ OK ]
HTTP -> HTTPS automatic redirect [ WARN ]
```

## Design principles

The following design principles have been considered:

* Simplicity of the codebase.
* The code should be easy to understand and follow without in-depth Python knowledge.
* Avoidance of external dependencies.
* The Python Standard Libary provides enough tools and libraries for quite many use cases.
* Unix philosophy in general
* *"Do one thing and do it well"*

These are not rules set in stone, but should be revisited when doing big design choices.
14 changes: 10 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "secheaders"
version = "0.1.0"
requires-python = ">=3.4"
requires-python = ">=3.8"
authors = [
{name = "Jussi-Pekka Erkkilä", email = "[email protected]"},
]
maintainers = [
{name = "Jussi-Pekka Erkkilä", email = "[email protected]"}
]

description = "Scan HTTP security headers"
readme = "README.md"
license = {file = "LICENSE"}
keywords = ["web", "security"]
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -26,6 +26,12 @@ classifiers = [
"Topic :: Security",
]

[project.urls]
Homepage = "https://github.com/juerkkil/secheaders"
Issues = "https://github.com/juerkkil/secheaders/issues"
Repository = "https://github.com/juerkkil/secheaders"


[project.scripts]
secheaders = "secheaders.securityheaders:main"

0 comments on commit a7debbf

Please sign in to comment.