1.1.1.4. pymacies_arg.loaders module

PymaciesArg.

An extension that registers all pharmacies in Argentina.

class pymacies_arg.loaders.BaseLoader[source]

Bases: object

Base class for Load all tables in DB.

load_table(df, engine)[source]

Read a data frame from csv file path.

Load Departamentos table in the database from sql query.

Parameters

df (pandas.DataFrame) – The dataframe must with the values.

Returns

df.to_sql – A sql query such that load all values in the database.

Return type

function

table_name = 'Base'
class pymacies_arg.loaders.DepartmentsLoader(engine)[source]

Bases: pymacies_arg.loaders.BaseLoader

Load Departamentos table in the DB.

table_name

The name of table.

Type

str, optional (default=’departamentos’)

load_table(file_path)[source]

Read a csv file from a file path and load departamentos table.

Load Departamentos table in the database from sql query.

Parameters

file_path (str) – The path of csv file with all Departamentos.

Returns

super().load_table(df) – A sql query such that load all Departamentos in the database.

Return type

function

table_name = 'departments'
class pymacies_arg.loaders.LocationsLoader(engine)[source]

Bases: pymacies_arg.loaders.BaseLoader

Load Localidades table in the DB.

table_name

The name of table.

Type

str, optional (default=’localidades’)

load_table(file_path)[source]

Read a csv file from a file path and and load localidades table.

Load Localidades table in the database from sql query.

Parameters

file_path (str) – The path of csv file with all Localidades.

Returns

super().load_table(df) – A sql query such that load all Localidades in the database.

Return type

function

table_name = 'locations'
class pymacies_arg.loaders.PharmaciesLoader(engine)[source]

Bases: pymacies_arg.loaders.BaseLoader

Load Farmacias table in the DB.

table_name

The name of table.

Type

str, optional (default=’farmacias’)

load_table(file_path)[source]

Read a csv file from a file path and and load farmacias table.

Load Farmacias table in the database from sql query.

Parameters

file_path (str) – The path of csv file with all Farmacias.

Returns

super().load_table(df) – A sql query such that load all Farmacias in the database.

Return type

function

table_name = 'pharmacies'