[sqlalchemy] Re: I have to create custom type in sqlAlchemy

2020-05-19 Thread Jonathan Vanasco
There is a section in the documentation titled "CustomTypes"

The following example shows how to encode and decode JSON:

https://docs.sqlalchemy.org/en/13/core/custom_types.html#marshal-json-strings

Please be advised: If you store data in your own custom format, as you 
described, it will be difficult to query.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/305cbea9-ab72-45bd-9412-3e42feb68315%40googlegroups.com.


[sqlalchemy] Re: custom encryption for db columns/fields

2020-05-19 Thread Jonathan Vanasco


> On Tuesday, 19 May 2020 19:24:48 UTC+2, Justvuur wrote:
>>
>> Is it possible to create a custom encryption/decryption algorithm that 
>> can be used with sqlalchemy querying/filtering?
>> When querying and filtering, I would like the field to automatically 
>> decrypt using the custom algorithm.
>>
>
You can create a SqlAlchemy CustomType that will encrypt/decrypt values to 
the database.(https://docs.sqlalchemy.org/en/13/core/custom_types.html)

There is an example of this when dealing with JSON:

https://docs.sqlalchemy.org/en/13/core/custom_types.html#marshal-json-strings


In order to query/filter the encrypted values, you will have to extend 
PostgreSQL to perform the encryption, decryption, and querying of that data.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/0dfba5fd-bdfd-4eee-9877-7650c0d8ee22%40googlegroups.com.


[sqlalchemy] Re: custom encryption for db columns/fields

2020-05-19 Thread Justvuur
Versions:
SQLAlchemy = 1.2
PostgreSQL = 11.2



On Tuesday, 19 May 2020 19:24:48 UTC+2, Justvuur wrote:
>
> Is it possible to create a custom encryption/decryption algorithm that can 
> be used with sqlalchemy querying/filtering?
> When querying and filtering, I would like the field to automatically 
> decrypt using the custom algorithm.
>
>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/eda117e1-8a57-497c-8a15-a405af05f32e%40googlegroups.com.


[sqlalchemy] custom encryption for db columns/fields

2020-05-19 Thread Justvuur
Is it possible to create a custom encryption/decryption algorithm that can 
be used with sqlalchemy querying/filtering?
When querying and filtering, I would like the field to automatically 
decrypt using the custom algorithm.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/29f8ce5e-dee0-4b52-bb5f-03e37ccc10b2%40googlegroups.com.


[sqlalchemy] I have to create custom type in sqlAlchemy

2020-05-19 Thread autonomous
I have user table which I need to store address in address custom data type 
like {"address_line_1":"","address_line_2":"","city":""} like that any one 
please help 

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/897068f9-93cc-4114-b88b-1b8d99f4a246%40googlegroups.com.