Skip to main content

pamda

This is a repo try to copy https://github.com/ramda/ramda in python.

install

For whom wants to use this package.

> pip install zydmayday-pamda
> pip install zydmayday-pamda -U # get the latest

Usage

>>> from pamda import curry
>>> def sum(a, b, c): return a + b + c
>>> curry(sum)(1)(2, 3)
6
>>> import pamda as R # similar to ramda syntax
>>> def sum(a, b, c): return a + b + c
>>> R.curry(sum)(1)(2, 3)
6

Contribute

For whom wants to contribute to this repo.

# see: https://pre-commit.com/ for more details
$ pre-commit install # install hooks

Check the latest branch to be released in here.

Checkout new branch from that release branch and create PR.

CheckList

Functions supported now.

  • __
  • add
  # different from ramda, ramda treat null as 0
  >>> R.add(None, None) # float('nan)
  • addIndex
  • adjust
  • all
    • Transducer part is not fully tested.
  • allPass
  • always
  • And (and is a keyword in python)
  • andThen
  • any
  • anyPass
  • ap
  • aperture
  • append
  • apply
  • applySpec
  • applyTo
  • ascend
  • assoc
  • assocPath
  • binary
  • bind
  • both
  • call
  • chain
  • clamp
  • clone
  • collectBy
  • comparator
  • complement
  • compose
  • composeWith
  • concat
  • cond
  • construct
  • constructN
  • converge
  • count
  • countBy
  • curry
  • curryN
  • dec
  • defaultTo
  • descend
  • difference
  • differenceWith
  • dissoc
  • dissocPath
  • divide
  • drop
  • dropLast
  • dropLastWhile
  • dropRepeats
  • dropRepeatsWith
  • dropWhile
  • either
  • empty
  • endsWith
  • eqBy
  • eqProps
  • equals
  • evolve
  • F
  • filter
  • find
  • findIndex
  • findLast
  • findLastIndex
  • flatten
  • flip
  • forEach
  • forEachObjIndexed
  • fromPairs
  • groupBy
  • groupWith
  • gt
  • gte
  • has
  • hasIn
  • hasPath
  • head
  • identical
  • identity
  • ifElse
  • inc
  • includes
  • indexBy
  • indexOf
  • init
  • innerJoin
  • insert
  • insertAll
  • intersection
  • intersperse
  • into
  • invert
  • invertObj
  • invoker
  • is
  • isEmpty
  • isNil
  • join
  • juxt
  • keys
# When using R.keys(obj) and obj is a class instance, we use obj.__dict__ as keys.
class A:
  c = 'not included'
  def __init__(self):
    self.a = 1
    self.b = 2
a = A()
R.keys(a) # ['a', 'b']
  • keysIn
  • last
  • lastIndexOf
  • length
  • lens
  • lensIndex
  • lensPath
  • lensProp
  • lift
  • liftN
  • lt
  • lte
  • Map (map is a keyword in python)
  • mapAccum
  • mapAccumRight
  • mapObjIndexed
  • match
  • mathMod
  • max
  • maxBy
  • mean
  • median
  • memoizeWith
  • mergeAll
  • mergeDeepLeft
  • mergeDeepRight
  • mergeDeepWith
  • mergeDeepWithKey
  • mergeLeft
  • mergeRight
  • mergeWith
  • mergeWithKey
  • min
  • minBy
  • modify
  • modifyPath
  • modulo
  • move
  • multiply
  • nAry
  • negate
  • none
  • not
  • nth
  • nthArg
  • o
  • objOf
  • of
  • omit
  • on
  • once
  • or
  • otherwise
  • over
  • pair
  • partial
  • partialObject
  • partialRight
  • partition
  • path
  • pathEq
  • pathOr
  • paths
  • pathSatisfies
  • pick
  • pickAll
  • pickBy
  • pipe
  • pipeWith
  • pluck
  • prepend
  • product
  • project
  • promap
  • prop
  • propEq
  • propIs
  • propOr
  • props
  • propSatisfies
  • range
  • reduce
  • reduceBy
  • reduced
  • reduceRight
  • reduceWhile
  • reject
  • remove
  • repeat
  • replace
  • reverse
  • scan
  • sequence
  • set
  • slice
  • sort
  • sortBy
  • sortWith
  • split
  • splitAt
  • splitEvery
  • splitWhen
  • splitWhenever
  • startsWith
  • subtract
  • sum
  • symmetricDifference
  • symmetricDifferenceWith
  • T
  • tail
  • take
  • takeLast
  • takeLastWhile
  • takeWhile
  • tap
  • test
  • thunkify
  • times
  • toLower
  • toPairs
  • toPairsIn
  • toString
  • toUpper
  • transduce
  • transpose
  • traverse
  • trim
  • tryCatch
  • type
  • unapply
  • unary
  • uncurryN
  • unfold
  • union
  • unionWith
  • uniq
  • uniqBy
  • uniqWith
  • unless
  • unnest
  • until
  • unwind
  • update
  • useWith
  • values
  • valuesIn
  • view
  • when
  • where
  • whereAny
  • whereEq
  • without
  • xor
  • xprod
  • zip
  • zipObj
  • zipWith

Metadata

Release files for zydmayday-pamda 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zydmayday-pamda 0.0.9
File Size Uploaded Provenance Actions
zydmayday-pamda-0.0.9.tar.gz 29.7 kB Without provenance Details for zydmayday-pamda-0.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zydmayday-pamda 0.0.9
File Interpreter ABI Platform Actions
zydmayday_pamda-0.0.9-py3-none-any.whl Python 3 none any Details for zydmayday_pamda-0.0.9-py3-none-any.whl

Total release size: 84.3 kB

Release files / zydmayday-pamda-0.0.9.tar.gz

Download URL zydmayday-pamda-0.0.9.tar.gz
Size 29.7 kB
Tags Source
SHA-256 checksum
How to use checksums
06dcb246668d13a6548b5deb181e66f369ab8b2e479db668a77a4a108a09de66
BLAKE2b-256 checksum
How to use checksums
6a3116b32bbd778cae6335bb3f8cd1ca9c8f8781320f971b22a9fee1a221279a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / zydmayday_pamda-0.0.9-py3-none-any.whl

Download URL zydmayday_pamda-0.0.9-py3-none-any.whl
Size 54.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a880cb912d1fe9161890dd4a618b9ebca183f72c9c1e937a6933055797cf6c2
BLAKE2b-256 checksum
How to use checksums
c1165f1c159bd973cfe7533b8e1acadeb2515c30ef4a20aca6f31f3b5b33e4f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Security for zydmayday-pamda 0.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page