Files
ServerSync/lib/secretstorage/__pycache__/collection.cpython-314.pyc

95 lines
15 KiB
Plaintext
Raw Normal View History

2026-02-19 00:55:27 +02:00
+
<00>;<3B>ie&<00><00>
<00>Rt^RIHt^RIHt^RIHtHt^RIH t ^RI
H t H t H t ^RIHt^RIHtHtHtHtHt]R,t]R ,tR
tR t!R R4tRRRlltRRltRRRlltRRltRRltRRlt R #)azCollection is a place where secret items are stored. Normally, only
the default collection should be used, but this module allows to use any
registered collection. Use :func:`get_default_collection` to get the
default collection (and create it, if necessary).
Collections are usually automatically unlocked when user logs in, but
collections can also be locked and unlocked using :meth:`Collection.lock`
and :meth:`Collection.unlock` methods (unlocking requires showing the
unlocking prompt to user and blocks until user accepts or declines it).
Creating new items and editing existing ones is possible only in unlocked
collections.
)<01>Iterator)<01>DBusConnection)<02>SS_PATH<54> SS_PREFIX)<01>Session)<03>ItemNotFoundException<6F>LockedException<6F>PromptDismissedException)<01>Item)<05>DBusAddressWrapper<65> exec_prompt<70> format_secret<65> open_session<6F>unlock_objects<74>
Collection<EFBFBD>Servicez(/org/freedesktop/secrets/aliases/defaultz+/org/freedesktop/secrets/collection/sessionc<00> a<00>]tRt^-toRt]R3V3RlRlltV3RlRltV3RlRltRV3R lR
llt V3R lR lt
V3R lRlt V3RlRlt V3RlRlt V3RlRltV3RlRltRV3RlRlltV3RlRltRtVtR#)rzRepresents a collection.Nc<00>><<01>V^8<>dQhRS[RS[RS[R,RR/#)<06><00>
connection<EFBFBD>collection_path<74>sessionN<6E>return)r<00>strr)<02>format<61> __classdict__s"<22><>?/tmp/pip-target-ugtna5l2/lib/python/secretstorage/collection.py<70> __annotate__<5F>Collection.__annotate__0s0<00><><00>/<2F>/<2F>><3E>/<2F>"%<25>/<2F>!<21>D<EFBFBD>.<2E>/<2F>48<34>/<2F>c<08><><00>WnW0nW n\V\V4VnVP
P R4R#)<02>LabelN)rrrr <00>COLLECTION_IFACE<43> _collection<6F> get_property)<04>selfrrrs&&&&r<00>__init__<5F>Collection.__init__0s=<00><00>%<25><0F><1E> <0C>.<2E><1C>-<2D> <1B>-<2D>z<EFBFBD>;<3B><04><18> <0C><18><18>%<25>%<25>g<EFBFBD>.rc<00> <<01>V^8<>dQhRS[/#<00>rr)<01>bool)rrs"<22>rrr:s<00><><00>=<3D>=<3D>4<EFBFBD>=rc <0C>J<00>\VPPR44#)zBReturns :const:`True` if item is locked, otherwise
:const:`False`.<2E>Locked)r*r#r$<00>r%s&r<00> is_locked<65>Collection.is_locked:s <00><00><14>D<EFBFBD>$<24>$<24>1<>1<>(<28>;<3B><<3C><rc<00><<01>V^8<>dQhRR/#<00>rrN<>)rrs"<22>rrr?s<00><><00>;<3B>;<3B>4<EFBFBD>;rc <0C>H<00>VP4'd \R4hR#)zQIf collection is locked, raises
:exc:`~secretstorage.exceptions.LockedException`.zCollection is locked!N)r.rr-s&r<00>ensure_not_locked<65>Collection.ensure_not_locked?s"<00><00> <10>><3E>><3E> <1B> <1B>!<21>"9<>:<3A> :<3A> rc<00>4<<01>V^8<>dQhRS[R,RS[/#)r<00>timeoutNr)<02>floatr*)rrs"<22>rrrEs#<00><><00>X<01>X<01>e<EFBFBD>d<EFBFBD>l<EFBFBD>X<01>d<EFBFBD>Xrc <0C>H<00>\VPVP.VR7#)a<>Requests unlocking the collection.
Returns a boolean representing whether the prompt has been
dismissed; that means :const:`False` on successful unlocking
and :const:`True` if it has been dismissed.
:raises: ``TimeoutError`` if `timeout` (in seconds) passed
and the prompt was neither accepted nor dismissed.
.. versionchanged:: 3.0
No longer accepts the ``callback`` argument.
.. versionchanged:: 3.5
Added ``timeout`` argument.
)r7)rrr)r%r7s&&r<00>unlock<63>Collection.unlockEs <00><00> <1E>d<EFBFBD>o<EFBFBD>o<EFBFBD><04>0D<30>0D<30>/E<>w<EFBFBD>W<>Wrc<00><<01>V^8<>dQhRR/#r1r2)rrs"<22>rrrWs<00><><00>;<3B>;<3B>d<EFBFBD>;rc <0C><><00>\\\VP4pVP RRVP
.4R#)zLocks the collection.<2E>Lock<63>aoN)r r<00> SERVICE_IFACEr<00>callr)r%<00>services& r<00>lock<63>Collection.lockWs-<00><00>$<24>W<EFBFBD>m<EFBFBD>T<EFBFBD>_<EFBFBD>_<EFBFBD>M<><07><0F> <0C> <0C>V<EFBFBD>T<EFBFBD>D<EFBFBD>$8<>$8<>#9<>:rc<00><<01>V^8<>dQhRR/#r1r2)rrs"<22>rrr\s<00><><00>D<01>D<01><04>Drc <0C><><00>VP4VPPRR4wpVR8wd.\VPV4wr#V'd \ R4hR#R#)z/Deletes the collection and all items inside it.<2E>Delete<74><00>/<2F>Prompt dismissed.N)r4r#rAr rr )r%<00>prompt<70> dismissed<65>_results& r<00>delete<74>Collection.delete\s[<00><00> <0C><1E><1E> <20><16>"<22>"<22>'<27>'<27><08>"<22>5<><07><06> <11>S<EFBFBD>=<3D>!,<2C>T<EFBFBD>_<EFBFBD>_<EFBFBD>f<EFBFBD>!E<> <1E>I<EFBFBD><18>.<2E>/B<>C<>C<><19> rc<00>0<<01>V^8<>dQhRS[S[,/#r))rr
)rrs"<22>rrres<00><><00>A<01>A<01>x<EFBFBD><04>~<7E>Arc# <0C><>"<00>VPPR4F%p\VPWP4x<00>K' R#5i)z3Returns a generator of all items in the collection.<2E>ItemsN)r#r$r
rr)r%<00> item_paths& r<00> get_all_items<6D>Collection.get_all_itemses6<00><00><00><1D>)<29>)<29>6<>6<>w<EFBFBD>?<3F>I<EFBFBD><16>t<EFBFBD><EFBFBD><EFBFBD> <09><<3C><<3C>@<40> @<40>@<01>s<00>AA c<00>L<<01>V^8<>dQhRS[S[S[3,RS[S[,/#)r<00>
attributesr)<04>dictrrr
)rrs"<22>rrrjs+<00><><00>A<01>A<01>t<EFBFBD>C<EFBFBD><13>H<EFBFBD>~<7E>A<01>(<28>4<EFBFBD>.<2E>Arc# <0C><>"<00>VPPRRV4wpVF%p\VPW0P4x<00>K' R#5i)z\Returns a generator of items with the given attributes.
`attributes` should be a dictionary.<2E> SearchItems<6D>a{ss}N)r#rAr
rr)r%rW<00>resultrSs&& r<00> search_items<6D>Collection.search_itemsjsB<00><00><00><17>"<22>"<22>'<27>'<27> <0A>w<EFBFBD>
<EFBFBD>K<><07><06><1F>I<EFBFBD><16>t<EFBFBD><EFBFBD><EFBFBD> <09><<3C><<3C>@<40> @<40> <20>s<00>A Ac<00> <<01>V^8<>dQhRS[/#r)<00>r)rrs"<22>rrrqs<00><><00><15><15>3<EFBFBD>rc <0C>l<00>VPPR4p\V\4'gQhV#)zReturns the collection label.r!)r#r$<00>
isinstancer<00>r%<00>labels& r<00> get_label<65>Collection.get_labelqs0<00><00><14> <20> <20>-<2D>-<2D>g<EFBFBD>6<><05><19>%<25><13>%<25>%<25>%<25>%<25><14> rc<00>$<<01>V^8<>dQhRS[RR/#)rrdrNr`)rrs"<22>rrrws<00><><00>;<3B>;<3B>s<EFBFBD>;<3B>t<EFBFBD>;rc <0C>`<00>VP4VPPRRV4R#)z!Sets collection label to `label`.r!<00>sN)r4r#<00> set_propertyrcs&&r<00> set_label<65>Collection.set_labelws&<00><00> <0C><1E><1E> <20> <0C><18><18>%<25>%<25>g<EFBFBD>s<EFBFBD>E<EFBFBD>:rc <00>T<<01>V^8<>dQhRS[RS[S[S[3,RS[RS[RS[RS[/#)rrdrW<00>secret<65>replace<63> content_typer)rrX<00>bytesr*r
)rrs"<22>rrr|sC<00><><00>><3E>><3E><13>><3E>$<24>s<EFBFBD>C<EFBFBD>x<EFBFBD>.<2E>><3E>!<21>><3E>,0<>><3E>"%<25>><3E>9=<3D>>rc <0C>8<00>VP4VP'g\VP4Vn\ VPW54p\
R,RV3\
R,RV3/pVP PRRVVV4wr<>\V4^8<>d!\VPW<>P4#\VPV 4wr<>V
'd \R4hV wr<>V R8XgQh\VPW<>P4#) aYCreates a new :class:`~secretstorage.item.Item` with given
`label` (unicode string), `attributes` (dictionary) and `secret`
(bytestring). If `replace` is :const:`True`, replaces the existing
item with the same attributes. If `content_type` is given, also
sets the content type of the secret (``text/plain`` by default).
Returns the created item.z
Item.LabelrizItem.Attributesr[<00>
CreateItemza{sv}(oayays)brJ<00>o) r4rrrr rr#rA<00>lenr
r r ) r%rdrWrnrorp<00>_secret<65>
propertiesrSrKrLr\<00> signatures &&&&&& r<00> create_item<65>Collection.create_item|s<><00><00> <0A><1E><1E> <20><13>|<7C>|<7C>|<7C>'<27><04><0F><0F>8<>D<EFBFBD>L<EFBFBD><1F><04> <0C> <0C>f<EFBFBD>C<><07> <15> <0C> $<24>s<EFBFBD>E<EFBFBD>l<EFBFBD> <15>)<29> )<29>G<EFBFBD>Z<EFBFBD>+@<40>
<EFBFBD>
<EFBFBD>!<21>,<2C>,<2C>1<>1<> <18> <1C> <16> <13> <13> 
<EFBFBD><19> <09> <0F>y<EFBFBD>><3E>A<EFBFBD> <1D><17><04><0F><0F><19>L<EFBFBD>L<EFBFBD>A<> A<>'<27><04><0F><0F><16>@<40><19> <09> <14>*<2A>+><3E>?<3F> ?<3F>%<25><1C> <09><18>C<EFBFBD><1F><1F><1F><13>D<EFBFBD>O<EFBFBD>O<EFBFBD>Y<EFBFBD> <0C> <0C>=<3D>=rc<00> <<01>V^8<>dQhRS[/#r)r`)rrs"<22>rrr<00>s<00><><00>R<01>R<01>#<23>Rrc<08>H<00>RVP4: RVP: R2#)z <Collection z path=<3D>>)rerr-s&r<00>__repr__<5F>Collection.__repr__<5F>s&<00><00><1D>d<EFBFBD>n<EFBFBD>n<EFBFBD>.<2E>1<><16><04>8L<38>8L<38>7O<37>q<EFBFBD>Q<>Qr)r#rrr<00>N)Fz
text/plain)<14>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__<5F>DEFAULT_COLLECTIONr&r.r4r:rCrNrTr]rerkryr~<00>__static_attributes__<5F>__classdictcell__)rs@rrr-s<><00><><00><00>"<22>);<3B>+/<2F>/<2F>/<2F>=<3D>=<3D>
;<3B>;<3B> X<01>X<01>$;<3B>;<3B>
D<01>D<01>A<01>A<01>
A<01>A<01><15><15> ;<3B>;<3B>
><3E>><3E>BR<01>RrNc
<00>b<00>V^8<>dQhR\R\R\R\R,R\/#)rrrd<00>aliasrNr)rrrr)rs"rrr<00>s<<00><00>D<01>D<01>.<2E>D<01><13>D<01>S<EFBFBD>D<01>&<26><14>~<7E>D<01>9C<39>Drc<04>L<00>V'g \V4p\R,RV3/p\\\V4pVP RRWB4wrg\ V4^8<>d\WVR7#\W4wr<>V'd \R4hV wr<>V
R8XgQh\WVR7#)z<>Creates a new :class:`Collection` with the given `label` and `alias`
and returns it. This action requires prompting.
:raises: :exc:`~secretstorage.exceptions.PromptDismissedException`
if the prompt is dismissed.
zCollection.Labelri<00>CreateCollectionza{sv}s)rrJrt)
rrr rr@rArurr r ) rrdr<>rrwrBrrKrLr\rxs &&&& r<00>create_collectionr<6E><00>s<><00><00> <13><1E>z<EFBFBD>*<2A><07><1B>0<>0<>3<EFBFBD><05>,<2C>?<3F>J<EFBFBD> <20><17>-<2D><1A>D<>G<EFBFBD>%<25>l<EFBFBD>l<EFBFBD>+=<3D>x<EFBFBD>+5<>><3E><1B>O<EFBFBD>
<EFBFBD>?<3F><1B>a<EFBFBD><1F><19>*<2A>w<EFBFBD>G<>G<>#<23>J<EFBFBD>7<><15>I<EFBFBD><10>&<26>':<3A>;<3B>;<3B>!'<27><1E>I<EFBFBD> <14><03> <1B><1B> <1B> <15>j<EFBFBD>7<EFBFBD> C<>Crc<00>F<00>V^8<>dQhR\R\\,/#<00>rrr)rrr)rs"rrr<00>s<00><00>6<>6<>N<EFBFBD>6<>x<EFBFBD>
<EFBFBD>7K<EFBFBD>6rc#<04><>"<00>\\\V4pVPR4Fp\ W4x<00>K R#5i)z1Returns a generator of all available collections.<2E> CollectionsN)r rr@r$r)rrBrs& r<00>get_all_collectionsr<73><00>s3<00><00><00> <20><17>-<2D><1A>D<>G<EFBFBD>"<22>/<2F>/<2F> <0A>><3E><0F><18><1A>5<>5<>?<3F>s<00>=?c<00>J<00>V^8<>dQhR\R\R,R\/#)rrrNr)rrr)rs"rrr<00>s,<00><00>L<01>L<01>~<7E>L<01>$+<2B>d<EFBFBD>N<EFBFBD>L<01>>H<>Lrc<04>X<00>\V4# \d\TRRT4u#i;i)z@Returns the default collection. If it doesn't exist,
creates it.<2E>Default<6C>default)rrr<>)rrs&&r<00>get_default_collectionr<6E><00>s5<00><00>L<01><19>*<2A>%<25>%<25><> <20>L<01> <20><1A>Y<EFBFBD> <09>7<EFBFBD>K<>K<>L<01>s <00>
<00>)<03>)c<00>0<00>V^8<>dQhR\R\/#r<>)rr)rs"rrr<00>s<00><00>=<3D>=<3D>><3E>=<3D>j<EFBFBD>=rc<04><><00>\V4# \dMi;i\T\4# \dMi;i\\ T44pT'd
T^,#\R4h)z<>Returns any collection, in the following order of preference:
- The default collection;
- The "session" collection (usually temporary);
- The first collection in the collections list.zNo collections found.)rr<00>SESSION_COLLECTION<4F>listr<74>)r<00> collectionss& r<00>get_any_collectionr<6E><00>st<00><00>  <0A><19>*<2A>%<25>%<25><> <20> <0A> <0C> <0A><> <0A><1A>*<2A>&8<>9<>9<><39> <20> <0A> <0C> <0A><><16>*<2A>:<3A>6<>7<>K<EFBFBD><12><1A>1<EFBFBD>~<7E><1D>#<23>$;<3B><<3C><s<00>
<00> <03><03>/<00> =<03>=c<00><<00>V^8<>dQhR\R\R\/#)rrr<>r)rrr)rs"rrr<00>s#<00><00> 3<> 3<><0E> 3<>#&<26> 3<>+5<> 3rc<04><><00>\\\V4pVPRRV4wp\ V4^8:d \ R4h\ W4#)z<>Returns the collection with the given `alias`. If there is no
such collection, raises
:exc:`~secretstorage.exceptions.ItemNotFoundException`.<2E> ReadAliasrizNo collection with such alias.)r rr@rArurr)rr<>rBrs&& r<00>get_collection_by_aliasr<73><00>sK<00><00>
!<21><17>-<2D><1A>D<>G<EFBFBD><1E>|<7C>|<7C>K<EFBFBD><13>e<EFBFBD><<3C><14>O<EFBFBD>
<EFBFBD>?<3F><1B>q<EFBFBD> <20>#<23>$D<>E<>E<> <15>j<EFBFBD> 2<>2rc<00>t<00>V^8<>dQhR\R\\\3,R\\,/#)rrrWr)rrXrrr
)rs"rrr<00>s/<00><00>*<2A>*<2A>^<5E>*<2A>!<21>#<23>s<EFBFBD>(<28>^<5E>*<2A>08<30><14><0E>*rc#<04><>"<00>\\\V4pVPRRV4wr4W4,Fp\ W4x<00>K R#5i)zoReturns a generator of items in all collections with the given
attributes. `attributes` should be a dictionary.rZr[N)r rr@rAr
)rrWrB<00>locked<65>unlockedrSs&& rr]r]<00>sE<00><00><00>!<21><17>-<2D><1A>D<>G<EFBFBD><1E>|<7C>|<7C>M<EFBFBD>7<EFBFBD>J<EFBFBD>G<><14>F<EFBFBD><1B>&<26>&<26> <09><12>:<3A>)<29>)<29>'<27>s<00>A A )rHNr<4E>)!r<><00>collections.abcr<00>jeepney.io.blockingr<00>secretstorage.definesrr<00>secretstorage.dhcryptor<00>secretstorage.exceptionsrrr <00>secretstorage.itemr
<00>secretstorage.utilr r r rrr"r@r<>r<>rr<>r<>r<>r<>r<>r]r2rr<00><module>r<>s<><00><01> <04>%<25>.<2E>4<>*<2A><02><02>
$<24><02><02><1D>|<7C>+<2B><10><19>I<EFBFBD>%<25> <0A>?<3F><12>B<><12>qR<01>qR<01>hD<01>06<>L<01>=<3D>. 3<>*r