Skip to content

Commit

Permalink
Add optional dependencies import in the Python binding (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
fvaleye committed Dec 27, 2021
1 parent e503ffd commit a25064b
Show file tree
Hide file tree
Showing 15 changed files with 515 additions and 470 deletions.
2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "metadata_guardian-python"
version = "0.0.9"
version = "0.1.0"
authors = ["Florian Valeye <fvaleye@github.com>"]
homepage = "https://fvaleye.github.io/metadata-guardian/python"
license = "Apache-2.0"
Expand Down
6 changes: 3 additions & 3 deletions python/docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Scan the column names of a local source:
Scan the column names of a external source on a table:

>>> from metadata_guardian import DataRules, ColumnScanner, AvailableCategory
>>> from metadata_guardian.source.external.snowflake_source import SnowflakeSource
>>> from metadata_guardian.source import SnowflakeSource
>>>
>>> data_rules = DataRules.from_available_category(category=AvailableCategory.PII)
>>> source = SnowflakeSource(sf_account="account", sf_user="sf_user", sf_password="sf_password", warehouse="warehouse", schema_name="schema_name")
Expand All @@ -29,7 +29,7 @@ Scan the column names of a external source on a table:
Scan the column names of a external source on database:

>>> from metadata_guardian import DataRules, ColumnScanner, AvailableCategory
>>> from metadata_guardian.source.external.snowflake_source import SnowflakeSource
>>> from metadata_guardian.source import SnowflakeSource
>>>
>>> data_rules = DataRules.from_available_category(category=AvailableCategory.PII)
>>> source = SnowflakeSource(sf_account="account", sf_user="sf_user", sf_password="sf_password", warehouse="warehouse", schema_name="schema_name")
Expand All @@ -41,7 +41,7 @@ Scan the column names of an external source for a database asynchronously with a

>>> import asyncio
>>> from metadata_guardian import DataRules, ColumnScanner, AvailableCategory
>>> from metadata_guardian.source.external.snowflake_source import SnowflakeSource
>>> from metadata_guardian.source import SnowflakeSource
>>>
>>> data_rules = DataRules.from_available_category(category=AvailableCategory.PII)
>>> source = SnowflakeSource(sf_account="account", sf_user="sf_user", sf_password="sf_password", warehouse="warehouse", schema_name="schema_name")
Expand Down
6 changes: 6 additions & 0 deletions python/metadata_guardian/source/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
from .external.aws_source import *
from .external.deltatable_source import *
from .external.external_metadata_source import *
from .external.gcp_source import *
from .external.snowflake_source import *
from .local.avro_schema_source import *
from .local.avro_source import *
from .local.local_metadata_source import *
from .local.orc_source import *
from .local.parquet_source import *
Expand Down
Loading

0 comments on commit a25064b

Please sign in to comment.