semvec/pypi-packages huggingface dataset:
django-admin-page-api 1.3.1
Django Admin Page API
License: MIT

# Django Admin Page API

[Django Admin Page API](https://pypi.org/project/django-admin-page-api/)

## Instalation

Run a command:

```bash
pip install django-admin-page-api
```

Make changes in your project:

```py
# urls.py

from django_admin_page_api import sites

urlpatterns = [
    ...
    path('admin-api/', sites.urls),
    ...
]
```

```py
# settings.py

INSTALLED_APPS = [
    ...
    'django_admin_page_api',
    ...
]
```

### Important: Data should be send using FormData

# Endpoints

## `/admin-api/`

- GET - Fetch list of models available in django admin

## `/admin-api/<app_label>/<model_name>`

- GET - Fetch model info

- POST - Create new instance of model (FormData)

## `/admin-api/<app_label>/<model_name>/<field_name>/autocomplete/`

- GET - get possible value to relation
  - Search params:
    - offset: number
    - limit: number
    - query: json string - e.g. {"int_field\_\_gt": 1}
    - sort: string
    - asc: boolean string

## `/admin-api/<app_label>/<model_name>/items`

- GET - List of items
  - Search params:
    - offset: number
    - limit: number
    - query: json string - e.g. {"int_field\_\_gt": 1}
    - sort: string
    - asc: boolean string
- DELETE - Delete items
  - Search params:
    - keys - list of primary keys to delete (may be separated by commas)

## `/admin-api/<app_label>/<model_name>/<pk>`

- GET - Fetch item data
- PUT - Update instance of the object and save (FormData)
- DELETE - Delete item

## `/admin-api/<app_label>/<model_name>/<pk>/<field_name>/autocomplete/`

- GET - get possible value to relation
  - Search params:
    - offset: number
    - limit: number
    - query: json string - e.g. {"int_field\_\_gt": 1}
    - sort: string
    - asc: boolean string

## `/admin-api/signin`

- POST - sign in (FormData)
  - Request body:
    - username: string
    - password: string

## `/admin-api/signout`

## `/admin-api/info`

- GET - Fetch current user and session data

## `/admin-api/csrf`

- GET - Fetch csrf token

## `/admin-api/logs`

- GET - Fetch logs of authenticated user

## `/admin-api/<app_label>/<model_name>/action/<action_code>/`

- POST - run model action
  - Request body:
    - keys - list of primary keys to delete (may be separated by commas)
databaseConnector2000 0.0.1
A python package for connecting with database.
License: MIT
Requires Python: >=3.7

# requirements_dev.txt we use for the testing
It makes it easier to install and manage dependencies for development and testing, separate from the dependencies required for production.

# difference between requirements_dev.txt and requirements.txt

requirements.txt is used to specify the dependencies required to run the production code of a Python project, while requirements_dev.txt is used to specify the dependencies required for development and testing purposes.

# tox.ini
We use if for the testing in the python package testing against different version of the python 

## how tox works tox enviornment creation
1. Install depedencies and packages 
2. Run commands
3. Its a combination of the (virtualenvwrapper and makefile)
4. It creates a .tox


# pyproject.toml
it is being used for configuration the python project it is a alternative of the setup.cfg file. its containts configuration related to the build system
such as the build tool used package name version author license and dependencies

# setup.cfg
In summary, setup.cfg is used by setuptools to configure the packaging and installation of a Python projec

# Testing python application
*types of testing*
1. Automated testing 
2. Manual testing

*Mode of testing*
1. Unit testing
2. Integration tests

*Testing frameworks*

1. pytest
2. unittest
3. robotframework
4. selenium
5. behave
6. doctest

# check with the code style formatting and syntax(coding standard)

1. pylint
2. flake8(it is best because it containt 3 library pylint pycodestyle mccabe)
3. pycodestyle