<commit_before># Database-Adapters 

The database adapters are the binding class to the actual database. 
If you are consider to build your own adapter please keep in mind: 

* All adapters **must** enhance the [BaseAdapter](./../provdbconnector/db_adapters/baseadpter.py) class. 
* You **must** implement all specified functions in BaseAdapter
* You **should** test it via the [AdapterTestTemplate](./../provdbconnector/tests/db_adapters_test_baseadapter.py) class template. 
* You **should** test it also via the [ProvApiTestTemplate](./../provdbconnector/tests/test_provapi.py) class template. 


## Create your own adapter

Lets play a little bit and create our own database adapter: 

### 1. - Create your database adapter

First you must create a class that extend from BaseAdapter and implement all functions.

```python 

from provdbconnector.db_adapters.baseadapter import BaseAdapter<commit_msg>Update paths to templates..<commit_after># Database-Adapters 

The database adapters are the binding class to the actual database. 
If you are consider to build your own adapter please keep in mind: 

* All adapters **must** enhance the [BaseAdapter](./../provdbconnector/db_adapters/baseadapter.py) class. 
* You **must** implement all specified functions in BaseAdapter
* You **should** test it via the [AdapterTestTemplate](./../provdbconnector/tests/db_adapters/test_baseadapter.py) class template. 
* You **should** test it also via the [ProvApiTestTemplate](./../provdbconnector/tests/test_provapi.py) class template. 


## Create your own adapter

Lets play a little bit and create our own database adapter: 

### 1. - Create your database adapter

First you must create a class that extend from BaseAdapter and implement all functions.

```python 

from provdbconnector.db_adapters.baseadapter import BaseAdapter
{'fraction_non_alphanumeric': 0.08931506849315068, 'fraction_numerical': 0.001095890410958904, 'mean_word_length': 4.724137931034483, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2981049', 'n_tokens_mistral': 507, 'n_tokens_neox': 478, 'n_words': 200}