The function field $K(\mathbb{P}^1)$ of $\mathbb{P}^1$ is given by rational functions homogeneous in $x, y$ of total degree $0$. The picard group of $\mathbb{P}^1$ is $\mathbb{Z}$ and we can take as representatives of the isomorphism classes of line bundles in $\mathrm{Pic}(\mathbb{P}^1)$ the bundles $\mathcal{O}(nP)$ where $P=[1:0] \in \mathbb{P}^1$. Then the sections of $\mathcal{O}(nP)$ on the distinguished open $U_f$ of $\mathbb{P}^1$ for $f$ some degree $d$ homogeneous polynomial in $x, y$ are given by $\frac{p}{y^nf^k} \in K(\mathbb{P}^1)$ so that $p$ is a homogeneous polynomial of degree $n+dk$.
Now, given a section of $\mathcal{O}(nP)(U_f)$ one can differentiate with respect to $\frac{x}{y}$ and get some element of $\mathcal{O}((n-1)P)(U_f)$ (here I'm temporarily thinking of the function field as rational functions (not necessarily homogeneous) in $\frac{x}{y}$).
So the upshot is that we get a map $D: \mathcal{O}(n) \to \mathcal{O}(n-1)$. This is not a map of line bundles but does satisfy the property $D(\alpha g)=D(\alpha)g + \alpha D(g)$ for $g \in \mathcal{O}(n)(U_f), \alpha \in \mathcal{O}(\mathbb{P}^1)$. Thus, it's some sort of derivation between line bundles.
Now the question. I'd like to generalize this map to more interesting varieties than $\mathbb{P}^1$. How do I do this? Any more general context for these maps would be appreciated.