Client APIs
Python Function Types
Currently, two function types are supported, `native` (default) and `arrow`.  
#### Arrow {#docs:api:python:function::arrow}  
If the function is expected to receive arrow arrays, set the `type` parameter to `'arrow'`.  
This will let the system know to provide arrow arrays of up to `STANDARD_VECTOR_SIZE` tuples to the function, and also expect an array of the same amount of tuples to be returned from the function.  
#### Native {#docs:api:python:function::native}  
When the function type is set to `native` the function will be provided with a single tuple at a time, and expect only a single value to be returned.
This can be useful to interact with Python libraries that don't operate on Arrow, such as `faker`:  
```python
import duckdb

from duckdb.typing import *
from faker import Faker

def random_date():
fake = Faker()
return fake.date_between()

duckdb.create_function("random_date", random_date, [], DATE, type="native")
res = duckdb.sql("SELECT random_date()").fetchall()
print(res)
```  
```text
[(datetime.date(2019, 5, 15),)]
```