semvec/pypi-packages huggingface dataset:
superglobals 0.0.17
globals() access anywhere. "We Do Anything, Anytime"
License: MIT
Requires Python: >=2.7

Easy access to globals() from inside a python module.

See: https://stackoverflow.com/questions/15959534/visibility-of-global-variables-in-imported-modules/69029612#69029612

Using superglobals
==================

.. code-block:: python

    import superglobals
    
    from superglobals import *

    superglobals()[var] = value

    setglobal('test', 123)
    defaultglobal('test', 456)
    assert(getglobal('test') == 123)

    setglobal('a.b.c', 7)
    > a['b']['c'] == 7

    setglobal('a\.b\.c', 8)
    > globals()['a.b.c'] == 8


Changelog
=========

0.0.10: initial release (2021-09-02)
0.0.13: added dotted object heirachy expansion (2021-09-13)
tcom 0.16
Replace your HTML templates with Python server-Side components
License: MIT
Requires Python: >=3.9,<4.0

<h1>
  <img
    src="https://github.com/jpsca/tcom/raw/main/docs/assets/images/logo.png"
    width="48" height="48"
    align="bottom"
   >
  Template Components
</h1>

The power of components in your server-side-rendered Python web app.

**Documentation:** https://tcom.scaletti.dev/

Write server-side components as single Jinja template files.
Use them as HTML tags without doing any importing.

<img class="card-code"  src="./docs/assets/images/card-code.png" height="300">

## About

This project is developed by *Juan-Pablo Scaletti*.<br>
I love building products and sharing knowledge.
simple-xsrf 0.2.1
Simple package to protect against CSRF/XSRF attacks
License: MIT
Requires Python: >=3.8,<4.0
Keywords: csrf,xsrf,security

# simple-xsrf

A simple package to create CSRF/XSRF tokens and protect against CSRF/XSRF attacks.

### Installation
```
pip install simple-xsrf
```

### Usage

To use this package you will need a fernet key also known as a secret key. To create a key:
```python
from cryptography.fernet import Fernet

key = Fernet.generate_key()
```
**Make sure to store this key in a secure place like a database so that you can access it later. You will need it to create your tokens and decrypt them**

Creating a token:
```python
from simple_xsrf.token import create_xsrf

token = create_xsrf(key)
```

Checking if a token is valid:
```python
from simple_xsrf.token import is_valid

is_token_valid = is_valid(key, token_from_request, token_from_storage)
```
You should store your token in a storage layer such as Redis or DynamoDB to be retrived later.