semvec/pypi-packages huggingface dataset:
django-gaston 0.4.1
A django menu generator
Requires Python: >=3.6

# Gaston

A django menu generator.

## CSS Classes

### Menu

A `depth-{{ depth_count }}` CSS class is added to every `<ul>`, indicating its depth, 0-indexed.
### Submenu

Gaston automatically adds the following CSS classes to your `MenuItem` elements:

class|description
-|-
`active`|If the current URL exactly matches the `MenuItem`'s URL
`selected`|If the current URL contains the `MenuItem`'s `url`<br />If any submenu `MenuItem`'s `url` exatly matches the current URL

## Menu Items

Gaston defines a `MenuItem` class. Each `MenuItem` accepts the following parameters:

Parameter|Decsription
-|-
`label`|The label to be displayed.
`url`|The URL of the menu item.
`css_classes`|Additional CSS classes for the specific element.
`submenu`|A list of `MenuItem` that will be rendered as a nested `<ul>`.

## Available `tempaltetags`

Gaston provides the following templatetags:

tag|description
-|-
`menu`|Renders a given menu.
`get_item_css_classes`|Returns a string with the item's CSS classes.

## Usage

### Installation

- install `django-gaston`

- Add `gaston` to your `INSTALLED_APPS` in `settings.py`:

```py
INSTALLED_APPS = [
    ...
    "gaston",
    ...
]
```

### Definitions

- Define a `menus.py` with your menu layout:

```py
from django.urls import reverse

from gaston.menu import MenuItem

about_menu = [
    MenuItem("Company", url=reverse("company")),
    MenuItem("FAQ", url=reverse("faq")),
]

main_menu = [
    MenuItem("Home", url=reverse("home")),
    MenuItem("About", url=reverse("about"), css_classes="with-submenu", submenu=about_menu),
]
```

- Define a context processor inside an app (e.g. `PROJECT_NAME/context_processors.py`):

```py
from .menus import main_menu


def menus(request):
    return {
        "main_menu": main_menu,
    }
```

- Add the above context processor in your list of context processors (in `settings.py`):
```py
TEMPLATES = [
    {
        ...
        "OPTIONS": {
            "context_processors": [
                ...
                "APP_NAME.context_processors.menus",
            ],
        },
    },
]
```

Where `APP_NAME` is the name of the app where you defined your `menus.py`.

### Templates

Finally, load `gaston_tags` inside your template and call it as follows:

```html
{% load gaston_tags %}

<nav>{% menu main_menu %}</nav>
```

Where `main_menu` is the key from your context processor dictionary.

## Build and Publish

### Build

In the root folder run:

```bash
python3 setup.py sdist bdist_wheel
```

This will create a folder named `dist` with the code ready to be published to pypi.

### Publish to PYPI

Install `twine` with pipx by running
```bash
pipx install twine
```

Run the command bellow to publish the package

```bash
twine upload dist/*
```

Username and Password will be asked. For username, use `__token__` and for password the token that
was generated in the PYPI site.
fastapi-nest 0.1.1
class base view for fastapi

# FastAPI Controller and Route Decorators

This package provides a set of decorators and utilities to simplify the creation of FastAPI controllers and routes. It allows you to define controllers as classes and routes as methods within those classes, with automatic dependency injection of shared dependencies.

## Features

- **Controller Class**: Define a group of related routes within a single class.
- **Route Decorators**: Easily define route handlers with specific HTTP methods (GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, TRACE).
- **Automatic Dependency Injection**: Use `Depends` to inject dependencies into controller methods.
- **Simple Integration**: Integrate with existing FastAPI applications with minimal changes.

## Installation

To use these decorators, ensure that you have FastAPI installed in your environment. If not, you can install it using pip:

```bash
pip install fastapi-nest
```

Then, include the provided code in your project or package it accordingly.

## Usage

### Defining a Controller

To create a new controller, define a class and decorate it with `@controller`:

```python
from nest import controller

@controller()
class MyController:
    pass
```

### Defining Route Handlers

Use the provided HTTP method decorators to define route handlers within your controller:

```python
from nest import controller, get, post

@controller()
class MyController:
    
    @get("/items")
    def read_items(self):
        return {"message": "Reading items"}

    @post("/items")
    def create_item(self, item: dict):
        return {"message": "Creating item", "item": item}
```

### Dependency Injection

Use `Depends` to inject dependencies into your route handlers:

```python
from fastapi import Depends
from nest import controller, get

def get_current_user():
    # Logic to get the current user
    return {"user_id": 1}

@controller()
class MyController:
    
    # attribute inject
    current_user: dict = Depends(get_current_user)
    
    @get("/users/me")
    def read_current_user(self, current_user: dict = Depends(get_current_user)):
        assert self.current_user["user_id"] == current_user["user_id"]
        return {"message": "Reading current user", "user": current_user}
```

### Registering Controllers with FastAPI

To add your controller's routes to a FastAPI app, use the `as_api_router` utility:

```python
from fastapi import FastAPI
from nest import as_api_router
from my_controller import MyController

app = FastAPI()

my_controller_router = as_api_router(MyController())
app.include_router(my_controller_router)
```
aiida-bigdft 0.3.0
Translation layer for AiiDA-PyBigDFT
Requires Python: >=3.7
Keywords: aiida,plugin

# aiida-bigdft

Translation layer for AiiDA-PyBigDFT

## Installation

```shell
pip install aiida-bigdft
verdi quicksetup  # better to set up a new profile
verdi plugin list aiida.calculations  # should now show your calculation plugins
```

## Requirements

- A functioning BigDFT installation
- A copy of `bigdft.py` (Available in later versions of BigDFT, but also in this repository at `bigdft/bigdft.py`)

When setting up the BigDFT code, ensure that the executable is set to the `bigdft.py` script.

It is also important to source the `install/bin/bigdftvars.sh` script in your prepend.

```shell
# aiida code prepend

source ${BIGDFT_BUILD_DIR}/install/bin/bigdftvars.sh
```

Where BIGDFT_BUILD_DIR is the directory in which BigDFT was built.


## Usage

To see how calculations can be submitted, see the examples directory:

```shell
verdi daemon start     # make sure the daemon is running
cd examples
verdi run examples/example_01.py        # run test calculation
verdi process list -a  # check record of calculation
```

The plugin also includes verdi commands to inspect its data types:
```shell
verdi data bigdft list
verdi data bigdft export <PK>
```

## WorkChains

The included workchains use the `namespace` format, so inputs should be placed under the
`bigdft` namespace when launching a workchain

## License

MIT
## Contact

bigdft-developers@lists.launchpad.net
lxml-stubs 0.5.1
Type annotations for the lxml package

# lxml-stubs

## About
This repository contains external type annotations (see
[PEP 484](https://www.python.org/dev/peps/pep-0484/)) for the
[lxml](http://lxml.de/) package.


## Installation
To use these stubs with [mypy](https://github.com/python/mypy), you have to
install the `lxml-stubs` package.

    pip install lxml-stubs


## Contributing
Contributions should follow the same style guidelines as
[typeshed](https://github.com/python/typeshed/blob/master/CONTRIBUTING.md).


## History
These type annotations were initially included in
[typeshed](https://www.github.com/python/typeshed), but lxml's annotations
are still incomplete and have therefore been extracted from typeshed to
avoid unintentional false positive results.

The code was extracted by Jelle Zijlstra from the original typeshed codebase
and moved to a separate repository using `git filter-branch`.


## Authors
Numerous people have contributed to the lxml stubs; see the git history for
details.
sambaflux 0.2.2
Sampling Biomarker Analysis using flux sampling
Requires Python: >=3.6

# SAMBAflux
## Description
SAMpling Biomarker Analysis is a python package for running flux sampling on metabolic networks. Once installed, it can
be imported into new python scripts or used with scripts from the [SAMBA repository.](https://forgemia.inra.fr/metexplore/cbm/samba-project/samba)

## Visuals
[add example plots here]

## Getting started
### Requirements

- Python 3.7
- cobrapy
- A solver (GLPK, CPLEX, GUROBI)
- Access to a computer cluster or powerful computer when sampling larger models


### Installation
Install via pip:  

```bash
pip install sambaflux
```

## Usage
```
  -h, --help            show this help message and exit
  -m MODEL, --model MODEL
                        Metabolic model. Supported file formats: SBML, json, mat.
  -n NSAMPLES, --nsamples NSAMPLES
                        The number of samples
  -p PROCESSORS, --processors PROCESSORS
                        Number of processors
  -t THINNING, --thinning THINNING
                        The thinning factor of the generated sampling chain. A thinning of 10 means samples are returned every 10 steps.
  -o OUTPATH, --outpath OUTPATH
                        Outfile path (without filename)
  -k KO, --ko KO        KO file containing reactions to KO, specify nothing if you want to sample WT
  -s SEPKO, --sepko SEPKO
                        Separator for the KO file
  -r RESULTS, --results RESULTS
                        File containing reactions to output, specify nothing if you want only exchange reactions
  -q, --quiet           Use this flag to silence INFO logging.
  -d, --debug           Use this flag to turn on DEBUG logging.
  --dryrun              Use this flag to run the code without running sampling.
  --log LOG             Log file path + filename. Set to None to output to console.
  -b BIOMASS, --biomass BIOMASS
                        Number between 0 and 1, fraction of biomass to optimize
  --solver {cplex,gurobi,glpk}
                        Solver to use
  --exchangemin EXCHANGEMIN
                        The value used to set the minimum flux through exchange reactions (will be negative). Set to None if you want the default exchange reaction bounds.
  --biomassrxn BIOMASSRXN
                        A .tsv containing a Model column with the name of models and a Biomass column with the name of the corresponding biomass reaction.
  -f, --fva             Use this flag to run FVA as well as sampling.
  --onlyfva             Use this flag to run FVA instead of sampling.
```

See [here](https://forgemia.inra.fr/metexplore/cbm/samba-project/samba/-/blob/main/README.md) for set-up and usage with the project's
scripts.


## Authors
Juliette Cooke

## Acknowledgments


## License
MIT License (see LICENSE file)

## Project status
Currently active on this project.